Skip to content

Commit

Permalink
infra(release): use PAT for releases (#3029)
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Jul 25, 2024
1 parent 5b32959 commit 3f70b0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/prepare-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ on:
- beta
- rc

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

jobs:
prepare_release_pr:
Expand All @@ -29,6 +27,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}

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

- name: Run release
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "FakerJS Bot"
git config user.email "github-bot@fakerjs.dev"
if [ $RELEASE_TYPE = 'stable' ]; then
pnpm run release
else
Expand Down Expand Up @@ -82,4 +81,4 @@ jobs:
- Checklist: TODO add link to issue
"
env:
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ on:
release:
types: [published]

permissions:
contents: write # to push the release branch
permissions: {} # we use a personal access token to push the release branch

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

- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
Expand Down

0 comments on commit 3f70b0a

Please sign in to comment.