Skip to content

Commit

Permalink
Auto-publish to create.io
Browse files Browse the repository at this point in the history
Add a job in the release workflow for automatically publishing
to crates.io

Signed-off-by: Jason Rogena <[email protected]>
  • Loading branch information
jasonrogena committed Jul 10, 2022
1 parent 866de63 commit c231055
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,9 @@ jobs:
with:
files: target/lcov.info
fail_ci_if_error: true
- name: Check if can publish to crates.io
uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
dry-run: true
check-repo: false
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,17 @@ jobs:
asset_path: ${{ env.ASSET }}
asset_name: ${{ env.ASSET }}
asset_content_type: application/octet-stream

pubish-crates-io:
name: pubish-crates-io
runs-on: ubuntu-latest
needs: ['create-release']
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fs-librarian"
version = "0.2.0"
version = "0.2.1"
authors = ["Jason Rogena <[email protected]>"]
edition = "2021"
rust-version = "1.61"
Expand Down

0 comments on commit c231055

Please sign in to comment.