@@ -106,27 +106,27 @@ jobs:
106
106
runs-on : ubuntu-latest
107
107
name : Semantic release
108
108
steps :
109
- - uses : actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
109
+ - uses : actions/create-github-app-token@v2
110
+ id : app-token
111
+ with :
112
+ app-id : ${{ secrets.ECOSPARK_APP_ID }}
113
+ private-key : ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
114
+ - uses : actions/checkout@v4
110
115
with :
111
116
# Need to fetch entire commit history to
112
117
# analyze every commit since last release
113
118
fetch-depth : 0
114
- - uses : actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
119
+ # Uses generated token to allow pushing commits back
120
+ token : ${{ steps.app-token.outputs.token }}
121
+ # Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
122
+ persist-credentials : false
123
+ - uses : actions/setup-node@v4
115
124
with :
116
125
cache : npm
117
126
node-version : lts/*
118
127
- run : npm ci
119
128
# Branches that will release new versions are defined in .releaserc.json
120
129
- run : npx semantic-release
121
- # Don't allow interrupting the release step if the job is cancelled, as it can lead to an inconsistent state
122
- # e.g. git tags were pushed but it exited before `npm publish`
123
- if : always()
124
- env :
125
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
126
- NPM_TOKEN : ${{ secrets.NPM_PUBLISH_TOKEN }}
127
- # Re-run semantic release with rich logs if it failed to publish for easier debugging
128
- - run : npx semantic-release --dry-run --debug
129
- if : failure()
130
130
env :
131
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
131
+ GITHUB_TOKEN : ${{ steps.app-token.outputs.token }}
132
132
NPM_TOKEN : ${{ secrets.NPM_PUBLISH_TOKEN }}
0 commit comments