Skip to content

Commit 8901730

Browse files
committed
chore(ci): Use a custom github token for release-plz
1 parent 8a70994 commit 8901730

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ jobs:
2222
with:
2323
fetch-depth: 0
2424
persist-credentials: false
25+
- &generate-token
26+
name: Generate GitHub token
27+
uses: actions/create-github-app-token@v2
28+
id: generate-token
29+
with:
30+
app-id: ${{ secrets.RELEASE_PLZ_APP_ID }}
31+
private-key: ${{ secrets.RELEASE_PLZ_APP_PRIVATE_KEY }}
2532
- &install-rust
2633
name: Install Rust toolchain
2734
uses: dtolnay/rust-toolchain@stable
@@ -30,7 +37,7 @@ jobs:
3037
with:
3138
command: release
3239
env:
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
3441

3542
# Create a PR with the new versions and changelog, preparing the next release.
3643
release-plz-pr:
@@ -46,9 +53,10 @@ jobs:
4653
steps:
4754
- *checkout
4855
- *install-rust
56+
- *generate-token
4957
- name: Run release-plz
5058
uses: release-plz/action@v0.5
5159
with:
5260
command: release-pr
5361
env:
54-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}

0 commit comments

Comments
 (0)