Skip to content

Commit 9c3cdc3

Browse files
authored
Library-ify and add support for default number types (#4)
* 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
1 parent 9712b01 commit 9c3cdc3

File tree

11 files changed

+1059
-667
lines changed

11 files changed

+1059
-667
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
on:
2-
push:
3-
tags:
4-
- v*
2+
release:
3+
types: [published]
54

65
jobs:
7-
create_release:
8-
runs-on: ubuntu-latest
9-
outputs:
10-
upload_url: ${{ steps.create_release.outputs.upload_url }}
6+
publish_crate:
117
steps:
12-
- id: create_release
13-
uses: actions/create-release@v1
14-
env:
15-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8+
- uses: actions/checkout@v2
9+
- uses: actions-rs/toolchain@v1
1610
with:
17-
tag_name: ${{ github.ref }}
18-
release_name: ${{ github.ref }}
19-
11+
toolchain: stable
12+
- run: cargo publish
13+
env:
14+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2015
release_binary:
2116
runs-on: ${{ matrix.runs_on }}
22-
needs: create_release
2317
strategy:
2418
matrix:
2519
target:
@@ -57,7 +51,7 @@ jobs:
5751
env:
5852
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5953
with:
60-
upload_url: ${{ needs.create_release.outputs.upload_url }}
54+
upload_url: ${{ github.event.release.upload_url }}
6155
asset_path: ${{ matrix.target }}.zip
6256
asset_name: ${{ matrix.target }}.zip
6357
asset_content_type: application/zip

Cargo.lock

Lines changed: 42 additions & 82 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ authors = ["Ulysse Carion <[email protected]>"]
77
edition = "2018"
88

99
[dependencies]
10-
clap = "2.33"
11-
jtd = "0.1.4"
10+
clap = { version = "2.33.3", features = ["yaml"] }
11+
jtd = "0.3.1"
1212
serde_json = "1"
13-
failure = "0.1"
13+
anyhow = "1.0"
1414
chrono = "0.4"

0 commit comments

Comments
 (0)