Skip to content

Commit

Permalink
revert: "ci: use default token for changeset cleanup action"
Browse files Browse the repository at this point in the history
This reverts commit a232f3c.
  • Loading branch information
TheUnderScorer committed Oct 1, 2024
1 parent 52c916e commit a9425a3
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/upload-changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
types:
- published

permissions:
contents: write

jobs:
upload-changesets:
name: Upload changesets
Expand All @@ -33,10 +30,20 @@ jobs:
cleanup-changesets:
runs-on: ubuntu-latest
needs: upload-changesets
environment: production
steps:
- name: 'Get token for the GitHub App'
if: ${{ vars.APP_ID != '' }}
uses: actions/create-github-app-token@f2acddfb5195534d487896a656232b016a682f3c
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- uses: actions/checkout@v4
with:
ref: main
token: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}

- name: Remove changesets zip files
run: rm .changeset/changesets-*.zip
Expand All @@ -45,5 +52,5 @@ jobs:
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5
with:
add: '.'
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
message: 'chore(skip-ci): remove changesets zip files'

0 comments on commit a9425a3

Please sign in to comment.