Skip to content

Commit 6994cf9

Browse files
committed
[release] use trusted publishing
1 parent fc6b14a commit 6994cf9

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,21 @@ jobs:
1010
create-release:
1111
if: github.repository_owner == 'sunshowers-code'
1212
runs-on: ubuntu-latest
13+
environment: release
14+
permissions:
15+
id-token: write # Required for OIDC token exchange.
16+
contents: write # Required for creating releases.
1317
steps:
14-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@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@v1
2329
with:
2430
changelog: CHANGELOG.md

0 commit comments

Comments
 (0)