Skip to content

Commit 3ba01fd

Browse files
committed
Use a GitHub App for cutting a new release.
1 parent 27cd014 commit 3ba01fd

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,16 @@ jobs:
1616
name: Create release
1717
runs-on: ubuntu-latest
1818
steps:
19+
- name: Create access token
20+
uses: actions/create-github-app-token@v1
21+
id: app-token
22+
with:
23+
app-id: ${{ vars.RELEASE_APP_ID }}
24+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
1925
- name: Check out from SCM
2026
uses: actions/checkout@v4
27+
with:
28+
token: ${{ steps.app-token.outputs.token }}
2129
- name: Import GPG key
2230
uses: crazy-max/ghaction-import-gpg@v6
2331
with:
@@ -60,7 +68,7 @@ jobs:
6068
"-DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}"
6169
"-Dtag=v${{ github.event.inputs.releaseVersion }}"
6270
"-Dusername=${{ github.actor }}"
63-
"-Dpassword=${{ secrets.GITHUB_TOKEN }}"
71+
"-Dpassword=${{ steps.app-token.outputs.token }}"
6472
"-DrepoBaseUrl=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
6573
release:prepare
6674
- name: Perform release
@@ -75,7 +83,7 @@ jobs:
7583
"-DreleaseProfiles=release,-examples"
7684
"-Darguments=-Dgpg.useagent=false -DrepoBaseUrl=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
7785
"-Dusername=${{ github.actor }}"
78-
"-Dpassword=${{ secrets.GITHUB_TOKEN }}"
86+
"-Dpassword=${{ steps.app-token.outputs.token }}"
7987
"-DrepoBaseUrl=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
8088
release:perform
8189
- name: Create GitHub release

0 commit comments

Comments
 (0)