Skip to content

Commit

Permalink
Use app token to trigger next workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowCait authored Dec 16, 2022
1 parent 9a50cf1 commit 2fc4a0a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 2fc4a0a

Please # to comment.