Skip to content

Commit

Permalink
CI: Support automatic publish to crates.io on tag creation
Browse files Browse the repository at this point in the history
This would make it easier to release new crate, without having to
ping anyone.

Whoever has the right to create a new release on GitHub shall have the right
to publish it to crates.io

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
  • Loading branch information
NobodyXu authored and weihanglo committed Jul 22, 2024
1 parent a9900f3 commit 1f5c687
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on:
push:
tags:
- "*"

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish to crates.io
run: |
cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 comments on commit 1f5c687

Please sign in to comment.