Skip to content

Commit d158458

Browse files
committed
chore: use the github official action to generate tokens
1 parent 0f0493c commit d158458

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,20 @@ jobs:
5959
if: github.event.inputs.release == 'true'
6060
runs-on: ubuntu-latest
6161
steps:
62-
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
63-
id: generate-token
62+
- uses: actions/create-github-app-token@v1
63+
id: app-token
6464
with:
65-
app_id: ${{ secrets.ECOSPARK_APP_ID }}
66-
private_key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
65+
app-id: ${{ secrets.ECOSPARK_APP_ID }}
66+
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
6767
- uses: actions/checkout@v4
6868
with:
6969
# Need to fetch entire commit history to
7070
# analyze every commit since last release
7171
fetch-depth: 0
7272
# Uses generated token to allow pushing commits back
73-
token: ${{ steps.generate_token.outputs.token }}
73+
token: ${{ steps.app-token.outputs.token }}
74+
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
75+
persist-credentials: false
7476
- uses: actions/setup-node@v4
7577
with:
7678
node-version: lts/*
@@ -81,5 +83,5 @@ jobs:
8183
# e.g. git tags were pushed but it exited before `npm publish`
8284
if: always()
8385
env:
84-
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
86+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
8587
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

0 commit comments

Comments
 (0)