Skip to content

Commit 3581331

Browse files
authored
chore: automatic crates.io release (needs extra-steps) (#90)
1 parent 21fce60 commit 3581331

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- v[0-9]+.[0-9]+.[0-9]+
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
container:
13+
image: rust:latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v6
18+
19+
- name: Install toml-cli
20+
run: cargo install toml-cli
21+
22+
- name: Check version
23+
run: test "v$(toml get -r Cargo.toml package.version)" = "${{ github.ref_name }}"
24+
25+
- name: Publish
26+
run: cargo publish
27+
env:
28+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)