@@ -3,29 +3,35 @@ name: release
3
3
permissions :
4
4
pull-requests : write
5
5
contents : write
6
+ id-token : write
6
7
7
8
on :
8
9
push :
9
10
branches :
10
11
- main
11
12
12
13
jobs :
13
- crates :
14
+ publish- crates :
14
15
name : crates
15
16
runs-on : ubuntu-latest
16
17
if : ${{ github.repository_owner == 'graphql-hive' }}
17
18
steps :
18
19
- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
19
20
- uses : actions-rust-lang/setup-rust-toolchain@ac90e63697ac2784f4ecfe2964e1a285c304003a # v1
21
+ with :
22
+ cache : false
23
+ - name : Authenticate with crates.io
24
+ uses : rust-lang/crates-io-auth-action@v1
25
+ id : auth
20
26
- name : release-plz release
21
27
uses : release-plz/action@f9715bc3b46e211f764f4440a221ddb89ae8abb3 # v0.5.112
22
28
with :
23
29
command : release
24
30
env :
25
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26
- CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
31
+ GITHUB_TOKEN : ${{ secrets.RELEASE_PLZ_TOKEN }}
32
+ CARGO_REGISTRY_TOKEN : ${{ steps.auth.outputs.token }}
27
33
28
- pr :
34
+ release- pr :
29
35
name : pr
30
36
runs-on : ubuntu-latest
31
37
if : ${{ github.repository_owner == 'graphql-hive' }}
@@ -35,10 +41,15 @@ jobs:
35
41
steps :
36
42
- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
37
43
- uses : actions-rust-lang/setup-rust-toolchain@ac90e63697ac2784f4ecfe2964e1a285c304003a # v1
44
+ with :
45
+ cache : false
46
+ - name : Authenticate with crates.io
47
+ uses : rust-lang/crates-io-auth-action@v1
48
+ id : auth
38
49
- name : release-plz release-pr
39
50
uses : release-plz/action@f9715bc3b46e211f764f4440a221ddb89ae8abb3 # v0.5.112
40
51
with :
41
52
command : release-pr
42
53
env :
43
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44
- CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
54
+ GITHUB_TOKEN : ${{ secrets.RELEASE_PLZ_TOKEN }}
55
+ CARGO_REGISTRY_TOKEN : ${{ steps.auth.outputs.token }}
0 commit comments