From 25f81f1926377ed55e7df588ac0f80e9f73090e2 Mon Sep 17 00:00:00 2001 From: Gino Naumann Date: Sat, 9 Mar 2024 01:02:53 +0100 Subject: [PATCH] ci(github): use gh app for release --- .github/workflows/release.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 475c23c..610e194 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,18 +8,27 @@ on: - completed branches: - main - status: - - success jobs: release: runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write steps: + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.RELEASE_APP_ID }} + private_key: ${{ secrets.RELEASE_PRIVATE_KEY }} - name: Checkout uses: actions/checkout@v4 with: persist-credentials: false - - name: Semantic Release + token: ${{ steps.generate_token.outputs.token }} + - name: Run semantic-release uses: cycjimmy/semantic-release-action@v4 with: extra_plugins: | @@ -31,4 +40,4 @@ jobs: @semantic-release/github conventional-changelog-conventionalcommits env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}