Skip to content

Commit

Permalink
Setup a GH action to publish to crates.io on a new tag
Browse files Browse the repository at this point in the history
  • Loading branch information
brouberol committed May 22, 2022
1 parent fc13065 commit 0f766c4
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
env:
# (required) GitHub token for creating GitHub Releases.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Cross compile the binary to a matrix of targets and
# upload the artefacts to the release.
upload-assets:
Expand All @@ -47,4 +47,16 @@ jobs:
zip: windows
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_PROFILE_RELEASE_LTO: true
CARGO_PROFILE_RELEASE_LTO: true

# Publish the released crate to crates.io
publish-to-crates.io:
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 }}

0 comments on commit 0f766c4

Please sign in to comment.