File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,14 @@ defaults:
2020jobs :
2121 release :
2222 runs-on : ubuntu-latest
23- # The permissions should allow the user to:
24- # 1. Push to the branch of the repository that triggered the workflow.
25- # 2. Create a tag.
26- # 3. Push to crates.io.
2723 permissions :
24+ # The contents write should allow:
25+ # 1. Push to the branch of the repository that triggered the workflow.
26+ # 2. Create a tag.
27+ # 3. Push to crates.io.
2828 contents : write
29+ # The id-token write should allow the OIDC token exchange
30+ id-token : write
2931 steps :
3032 - uses : actions/checkout@v4
3133 - name : Install required packages
3436 run : cargo install --version 0.25.17 cargo-release
3537 - name : Set git user
3638 run : |
37- git config --global user.email "${GITHUB_TRIGGERING_ACTOR}@users.noreply.github.com> "
39+ git config --global user.email "${GITHUB_TRIGGERING_ACTOR}@users.noreply.github.com"
3840 git config --global user.name "${GITHUB_TRIGGERING_ACTOR}"
41+ - uses : rust-lang/crates-io-auth-action@v1
42+ id : auth
3943 - name : Run cargo release
4044 env :
41- CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
45+ CARGO_REGISTRY_TOKEN : ${{ steps.auth.outputs.token }}
4246 run : cargo release ${{ github.event.inputs.level }} --no-confirm --execute
You can’t perform that action at this time.
0 commit comments