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:
20
20
jobs :
21
21
release :
22
22
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.
27
23
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.
28
28
contents : write
29
+ # The id-token write should allow the OIDC token exchange
30
+ id-token : write
29
31
steps :
30
32
- uses : actions/checkout@v4
31
33
- name : Install required packages
34
36
run : cargo install --version 0.25.17 cargo-release
35
37
- name : Set git user
36
38
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"
38
40
git config --global user.name "${GITHUB_TRIGGERING_ACTOR}"
41
+ - uses : rust-lang/crates-io-auth-action@v1
42
+ id : auth
39
43
- name : Run cargo release
40
44
env :
41
- CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
45
+ CARGO_REGISTRY_TOKEN : ${{ steps.auth.outputs.token }}
42
46
run : cargo release ${{ github.event.inputs.level }} --no-confirm --execute
You can’t perform that action at this time.
0 commit comments