diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eca9e24..9c5502d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,14 +16,19 @@ jobs: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/') runs-on: ubuntu-latest timeout-minutes: 5 - env: - GH_TOKEN: ${{ github.token }} - GH_REPO: ${{ github.repository }} - RELEASE_BRANCH: ${{ github.event.pull_request.head.ref || github.event.inputs.version }} steps: + - id: generate-token + uses: tibdex/github-app-token@v1.7.0 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} - name: Create release draft id: release run: | version=${RELEASE_BRANCH#release/} gh release create ${version} --title ${version} --generate-notes + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + GH_REPO: ${{ github.repository }} + RELEASE_BRANCH: ${{ github.event.pull_request.head.ref || github.event.inputs.version }}