Skip to content

Commit

Permalink
ci(release): use github app token (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeshuaro committed Jan 13, 2024
1 parent 20d1df1 commit 34fd2f0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
yarn
yarn lint
semantic-release:
name: Semantic release
release:
name: Release
runs-on: ubuntu-latest
needs: [test, lint]
if: ${{ (github.ref == 'refs/heads/main') && (contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name)) }}
Expand All @@ -67,6 +67,13 @@ jobs:
pull-requests: write

steps:
- name: Create GitHub App token 🔑
id: create-app-token
uses: tibdex/github-app-token@v2.1.0
with:
app_id: ${{ secrets.GH_APP_ID }}
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}

- name: Checkout 🛎️
uses: actions/checkout@v4
with:
Expand All @@ -88,5 +95,5 @@ jobs:
- name: Release 🚀
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
GITHUB_TOKEN: ${{ steps.create-app-token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 34fd2f0

Please sign in to comment.