Skip to content

Commit 7b21e54

Browse files
committed
Add publish.yml
1 parent 41d7cf7 commit 7b21e54

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# https://blog.rust-lang.org/2025/07/11/crates-io-development-update-2025-07/
2+
3+
name: Publish to crates.io
4+
5+
on:
6+
push:
7+
tags: ["v*"] # Triggers when pushing tags starting with 'v'
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
environment: release # Optional: for enhanced security
13+
permissions:
14+
id-token: write # Required for OIDC token exchange
15+
steps:
16+
- uses: actions/checkout@v5
17+
- uses: rust-lang/crates-io-auth-action@v1
18+
id: auth
19+
- run: cargo publish
20+
env:
21+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

0 commit comments

Comments
 (0)