Skip to content

Commit

Permalink
Library-ify and add support for default number types (#4)
Browse files Browse the repository at this point in the history
* Use GitHub Releases for releases

* Refactor to use cli.yaml

* Fix compiler warnings

* Refactor: use as lib, and custom default number type

* Fix link in docs

* Update README

* Update README with links to crates.io and docs.rs

* Add publish_crate step to publish.yml

* Update README title
  • Loading branch information
ucarion authored Feb 1, 2021
1 parent 9712b01 commit 9c3cdc3
Show file tree
Hide file tree
Showing 11 changed files with 1,059 additions and 667 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
on:
push:
tags:
- v*
release:
types: [published]

jobs:
create_release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
publish_crate:
steps:
- id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}

toolchain: stable
- run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
release_binary:
runs-on: ${{ matrix.runs_on }}
needs: create_release
strategy:
matrix:
target:
Expand Down Expand Up @@ -57,7 +51,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ matrix.target }}.zip
asset_name: ${{ matrix.target }}.zip
asset_content_type: application/zip
124 changes: 42 additions & 82 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ authors = ["Ulysse Carion <[email protected]>"]
edition = "2018"

[dependencies]
clap = "2.33"
jtd = "0.1.4"
clap = { version = "2.33.3", features = ["yaml"] }
jtd = "0.3.1"
serde_json = "1"
failure = "0.1"
anyhow = "1.0"
chrono = "0.4"
Loading

0 comments on commit 9c3cdc3

Please sign in to comment.