Skip to content

Commit b6b2aec

Browse files
committed
chore: GitHub action to publish to crates.io when push a tag vX.Y.Z
1 parent c1795f4 commit b6b2aec

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/cargo-publish.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish to crates.io when v* tags
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
env:
12+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions-rs/toolchain@v1
16+
with:
17+
toolchain: stable
18+
override: true
19+
- name: Publish to crates.io
20+
run: cargo publish --verbose

0 commit comments

Comments
 (0)