Skip to content

Commit 106557b

Browse files
committed
[release] use trusted publishing
1 parent 4e0f7a1 commit 106557b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,21 @@ jobs:
1010
create-release:
1111
if: github.repository_owner == 'nextest-rs'
1212
runs-on: ubuntu-24.04
13+
environment: release
14+
permissions:
15+
id-token: write # Required for OIDC token exchange
16+
contents: write # Required for creating releases
1317
steps:
1418
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
1519
with:
1620
persist-credentials: false
21+
- uses: rust-lang/crates-io-auth-action@v1
22+
id: auth
1723
- name: Install Rust
1824
uses: dtolnay/rust-toolchain@stable
1925
- run: cargo publish
2026
env:
21-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
27+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
2228
- uses: taiki-e/create-gh-release-action@c5baa0b5dc700cf06439d87935e130220a6882d9 # v1
2329
with:
2430
changelog: CHANGELOG.md

0 commit comments

Comments
 (0)