Skip to content

Commit 5e2c696

Browse files
committed
Add release job
Signed-off-by: Guillaume W. Bres <[email protected]>
1 parent 0481062 commit 5e2c696

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/rust.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,22 @@ jobs:
2424
run: cargo build --all-features
2525
- name: Run tests
2626
run: cargo test --all-features --verbose
27+
28+
release:
29+
name: Release
30+
runs-on: ubuntu-latest
31+
needs: [build]
32+
if: github.ref_type == 'tag'
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Install stable toolchain
37+
uses: dtolnay/rust-toolchain@master
38+
with:
39+
toolchain: stable
40+
- name: Publish
41+
env:
42+
TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
43+
run: |
44+
cargo login $TOKEN
45+
cargo publish

0 commit comments

Comments
 (0)