Skip to content

Commit 6e70dc7

Browse files
dcrooterahul-thakoor
authored andcommitted
Add Actions job to publish to crates.io
1 parent 631bf5f commit 6e70dc7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/ci.yml

+15
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,18 @@ jobs:
2626
use-cross: true
2727
command: build
2828
args: --target ${{ matrix.target }}
29+
30+
cargo-publish:
31+
name: Publish to crates.io
32+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
33+
runs-on: ubuntu-latest
34+
needs: [build]
35+
steps:
36+
- uses: actions/checkout@v2
37+
- uses: actions-rs/toolchain@v1
38+
with:
39+
toolchain: stable
40+
profile: minimal
41+
override: true
42+
- name: Publish
43+
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}

0 commit comments

Comments
 (0)