Skip to content

Commit 83c6504

Browse files
authored
Merge pull request #14628 from getsentry/Replace-release-bot-with-GH-app
feat(release): Replace release bot with GH app
2 parents aa92eef + e92c857 commit 83c6504

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.github/workflows/auto-release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,16 @@ jobs:
1313
name: 'Prepare a new version'
1414

1515
steps:
16+
- name: Get auth token
17+
id: token
18+
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
19+
with:
20+
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
21+
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
22+
1623
- uses: actions/checkout@v4
1724
with:
18-
token: ${{ secrets.GH_RELEASE_PAT }}
25+
token: ${{ steps.token.outputs.token }}
1926
fetch-depth: 0
2027

2128
# https://github.com/actions-ecosystem/action-regex-match
@@ -38,7 +45,7 @@ jobs:
3845
uses: getsentry/action-prepare-release@v1
3946
if: github.event.pull_request.merged == true && steps.version-regex.outputs.match != '' && steps.get_version.outputs.version != ''
4047
env:
41-
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
48+
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
4249
with:
4350
version: ${{ steps.get_version.outputs.version }}
4451
force: false

.github/workflows/release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,20 @@ jobs:
1717
runs-on: ubuntu-20.04
1818
name: 'Release a new version'
1919
steps:
20+
- name: Get auth token
21+
id: token
22+
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
23+
with:
24+
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
25+
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
2026
- uses: actions/checkout@v4
2127
with:
22-
token: ${{ secrets.GH_RELEASE_PAT }}
28+
token: ${{ steps.token.outputs.token }}
2329
fetch-depth: 0
2430
- name: Prepare release
2531
uses: getsentry/action-prepare-release@v1
2632
env:
27-
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
33+
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
2834
with:
2935
version: ${{ github.event.inputs.version }}
3036
force: ${{ github.event.inputs.force }}

0 commit comments

Comments
 (0)