Skip to content

Commit 4ea00d8

Browse files
committed
ci: add crates.io publish workflow on version tags
1 parent 2f10d5b commit 4ea00d8

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish Crate to crates.io
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Check
20+
run: cargo check --verbose
21+
22+
# - name: Test
23+
# run: cargo test --verbose
24+
25+
- name: Dry run
26+
run: cargo publish --dry-run --verbose
27+
28+
- name: Publish
29+
run: cargo publish --verbose
30+
env:
31+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)