Skip to content

Commit

Permalink
ci(release): use github app token (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeshuaro committed Jan 13, 2024
1 parent 19640af commit 163789f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/github_actions.yml
Expand Up @@ -66,13 +66,20 @@ jobs:
dart format --output=none --set-exit-if-changed .
flutter analyze
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)) }}

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 Down Expand Up @@ -102,5 +109,5 @@ jobs:
- name: Release 🚀
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
GITHUB_TOKEN: ${{ steps.create-app-token.outputs.token }}
GOOGLE_SERVICE_ACCOUNT_KEY: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}

0 comments on commit 163789f

Please sign in to comment.