Skip to content

Commit 0a9bebf

Browse files
authored
Merge pull request #25 from bug-ops/copilot/configure-trusted-publishing
Configure Trusted Publishing for crates.io
2 parents 56c6a79 + b1b34b3 commit 0a9bebf

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,23 @@ jobs:
3232
runs-on: ubuntu-latest
3333
needs: crates-verify
3434
timeout-minutes: 15
35+
permissions:
36+
id-token: write
37+
contents: read
38+
environment:
39+
name: crates
40+
url: https://crates.io/crates/feedparser-rs
3541
steps:
3642
- uses: actions/checkout@v6
3743
- uses: dtolnay/rust-toolchain@stable
3844
- uses: Swatinem/rust-cache@v2
45+
- name: Authenticate with crates.io
46+
uses: rust-lang/crates-io-auth-action@v1
47+
id: auth
3948
- name: Publish to crates.io
4049
run: cargo publish -p feedparser-rs
4150
env:
42-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
51+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
4352

4453
# ============================================================================
4554
# PYPI

0 commit comments

Comments
 (0)