Skip to content

Commit 73c0e76

Browse files
wip
1 parent 62fb80d commit 73c0e76

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,26 @@ on:
66
jobs:
77
bump-version:
88
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
911

1012
outputs:
1113
new_version: ${{ steps.cz.outputs.version }}
1214

1315
steps:
16+
- name: Generate GitHub App Token
17+
id: app-token
18+
uses: actions/create-github-app-token@v2
19+
with:
20+
app-id: ${{ secrets.CI_BOT_APP_ID }}
21+
private-key: ${{ secrets.CI_BOT_PRIVATE_KEY }}
22+
repositories: ${{ github.event.repository.name }}
23+
1424
- uses: actions/checkout@v4
1525
with:
1626
persist-credentials: false
1727
fetch-depth: 0
28+
token: ${{ steps.app-token.outputs.token }}
1829

1930
- name: Set up Python 3.11
2031
uses: actions/setup-python@v5
@@ -30,7 +41,7 @@ jobs:
3041
name: Bump Version, Create Tag and Changelog
3142
uses: commitizen-tools/commitizen-action@master
3243
with:
33-
github_token: ${{ secrets.GH_ACCESS_TOKEN }}
44+
github_token: ${{ steps.app-token.outputs.token }}
3445
changelog_increment_filename: body.md
3546

3647
- name: Create Release
@@ -39,7 +50,7 @@ jobs:
3950
body_path: "body.md"
4051
tag_name: ${{ env.REVISION }}
4152
env:
42-
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
53+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
4354

4455
- name: Print Version
4556
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"

0 commit comments

Comments
 (0)