@@ -13,19 +13,29 @@ jobs:
13
13
permissions :
14
14
contents : write
15
15
steps :
16
+ # Generating a GitHub token, so that PRs and tags created by
17
+ # the release-plz-action can trigger actions workflows.
18
+ - name : Generate GitHub token
19
+ uses : actions/create-github-app-token@v2
20
+ id : generate-token
21
+ with :
22
+ # GitHub App ID secret name
23
+ app-id : ${{ secrets.APP_ID }}
24
+ # GitHub App private key secret name
25
+ private-key : ${{ secrets.APP_PRIVATE_KEY }}
16
26
- name : Checkout repository
17
27
uses : actions/checkout@v4
18
28
with :
19
29
fetch-depth : 0
20
- token : ${{ secrets.RELEASE_PLZ_TOKEN }}
30
+ token : ${{ steps.generate-token.outputs.token }}
21
31
- name : Install Rust toolchain
22
32
uses : dtolnay/rust-toolchain@stable
23
33
- name : Run release-plz
24
34
uses :
release-plz/[email protected]
25
35
with :
26
36
command : release
27
37
env :
28
- GITHUB_TOKEN : ${{ secrets.RELEASE_PLZ_TOKEN }}
38
+ GITHUB_TOKEN : ${{ steps.generate-token.outputs.token }}
29
39
CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
30
40
31
41
release-plz-pr :
@@ -39,17 +49,27 @@ jobs:
39
49
group : release-plz-${{ github.ref }}
40
50
cancel-in-progress : false
41
51
steps :
52
+ # Generating a GitHub token, so that PRs and tags created by
53
+ # the release-plz-action can trigger actions workflows.
54
+ - name : Generate GitHub token
55
+ uses : actions/create-github-app-token@v2
56
+ id : generate-token
57
+ with :
58
+ # GitHub App ID secret name
59
+ app-id : ${{ secrets.APP_ID }}
60
+ # GitHub App private key secret name
61
+ private-key : ${{ secrets.APP_PRIVATE_KEY }}
42
62
- name : Checkout repository
43
63
uses : actions/checkout@v4
44
64
with :
45
65
fetch-depth : 0
46
- token : ${{ secrets.RELEASE_PLZ_TOKEN }}
66
+ token : ${{ steps.generate-token.outputs.token }}
47
67
- name : Install Rust toolchain
48
68
uses : dtolnay/rust-toolchain@stable
49
69
- name : Run release-plz
50
70
uses :
release-plz/[email protected]
51
71
with :
52
72
command : release-pr
53
73
env :
54
- GITHUB_TOKEN : ${{ secrets.RELEASE_PLZ_TOKEN }}
74
+ GITHUB_TOKEN : ${{ steps.generate-token.outputs.token }}
55
75
CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
0 commit comments