Skip to content

Commit

Permalink
ci: use github app token instead of PAT (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
meskill committed Sep 15, 2021
1 parent 28ae593 commit 8878bb5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/branch-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,20 @@ jobs:
test-publish:
runs-on: ubuntu-20.04
steps:
- name: Generate Token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.TOKEN_APP_ID }}
private_key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
token: ${{ steps.generate-token.outputs.token }}
- name: Dry-Run Release
uses: ridedott/release-me-action@v3
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
with:
dry-run: true
node-module: true
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@ jobs:
publish:
runs-on: ubuntu-20.04
steps:
- name: Generate Token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.TOKEN_APP_ID }}
private_key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
token: ${{ steps.generate-token.outputs.token }}
- name: Setup Node
uses: actions/setup-node@v2
with:
Expand All @@ -36,7 +42,7 @@ jobs:
id: release
uses: ridedott/release-me-action@v3
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
with:
dry-run: true
node-module: true
Expand Down Expand Up @@ -64,7 +70,7 @@ jobs:
- name: Release
uses: ridedott/release-me-action@v3
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
with:
dry-run: false
release-assets: release.zip
Expand Down

0 comments on commit 8878bb5

Please sign in to comment.