Skip to content

Commit 3f70b0a

Browse files
authored
infra(release): use PAT for releases (#3029)
1 parent 5b32959 commit 3f70b0a

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.github/workflows/prepare-release-pr.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ on:
1414
- beta
1515
- rc
1616

17-
permissions:
18-
contents: write
19-
pull-requests: write
17+
permissions: {} # we use a personal access token to push the branch and create the PR
2018

2119
jobs:
2220
prepare_release_pr:
@@ -29,6 +27,7 @@ jobs:
2927
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3028
with:
3129
fetch-depth: 0
30+
token: ${{ secrets.GH_TOKEN }}
3231

3332
- name: Install pnpm
3433
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
@@ -46,8 +45,8 @@ jobs:
4645

4746
- name: Run release
4847
run: |
49-
git config user.name "github-actions[bot]"
50-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
48+
git config user.name "FakerJS Bot"
49+
git config user.email "github-bot@fakerjs.dev"
5150
if [ $RELEASE_TYPE = 'stable' ]; then
5251
pnpm run release
5352
else
@@ -82,4 +81,4 @@ jobs:
8281
- Checklist: TODO add link to issue
8382
"
8483
env:
85-
GH_TOKEN: ${{ github.token }}
84+
GH_TOKEN: ${{ secrets.GH_TOKEN }}

.github/workflows/publish-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ on:
44
release:
55
types: [published]
66

7-
permissions:
8-
contents: write # to push the release branch
7+
permissions: {} # we use a personal access token to push the release branch
98

109
jobs:
1110
publish:
@@ -17,6 +16,7 @@ jobs:
1716
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1817
with:
1918
fetch-depth: 0 # we want to push the release branch later
19+
token: ${{ secrets.GH_TOKEN }}
2020

2121
- name: Install pnpm
2222
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0

0 commit comments

Comments
 (0)