Skip to content

Commit 1f5c687

Browse files
NobodyXuweihanglo
authored andcommitted
CI: Support automatic publish to crates.io on tag creation
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 <[email protected]>
1 parent a9900f3 commit 1f5c687

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/publish.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
on:
2+
push:
3+
tags:
4+
- "*"
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Publish to crates.io
12+
run: |
13+
cargo publish
14+
env:
15+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)