-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add workflow to publish Cargo automatically
- Loading branch information
1 parent
6d68563
commit a28baaf
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Publish Cargo to crates.io whenever a new tag is pushed. Tags are pushed by | ||
# the Rust release process (https://github.com/rust-lang/promote-release), | ||
# which will cause this workflow to run. | ||
|
||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- "**" | ||
|
||
# Prevent multiple releases from starting at the same time. | ||
concurrency: | ||
group: release | ||
|
||
jobs: | ||
crates-io: | ||
name: Publish on crates.io | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
|
||
# Gain access to the crates.io publishing token. | ||
environment: | ||
name: release | ||
|
||
steps: | ||
- name: Checkout the source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Publish Cargo to crates.io | ||
run: ./publish.py | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters