Skip to content

Commit d471942

Browse files
committed
chore: ci
1 parent d9d5ea0 commit d471942

1 file changed

Lines changed: 10 additions & 13 deletions

File tree

.github/workflows/publish.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
name: Publish crate
2-
1+
name: Publish to crates.io
32
on:
43
push:
5-
tags:
6-
- "v*"
7-
4+
tags: ['v*'] # Triggers when pushing tags starting with 'v'
85
jobs:
96
publish:
107
runs-on: ubuntu-latest
8+
environment: release # Optional: for enhanced security
119
permissions:
10+
id-token: write # Required for OIDC token exchange
1211
contents: read
13-
id-token: write
14-
1512
steps:
16-
- uses: actions/checkout@v4
17-
18-
- uses: dtolnay/rust-toolchain@stable
19-
20-
- name: Publish to crates.io
21-
run: cargo publish --locked
13+
- uses: actions/checkout@v6
14+
- uses: rust-lang/crates-io-auth-action@v1
15+
id: auth
16+
- run: cargo publish
17+
env:
18+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

0 commit comments

Comments
 (0)