Skip to content

Commit a7dedd4

Browse files
authored
fix: github token on release workflow (#6)
Signed-off-by: Cesar Berrospi Ramis <[email protected]>
1 parent 85072d6 commit a7dedd4

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

.github/workflows/build.yaml

+9-10
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
create-release:
3636
needs: build
37-
name: Semantic-Release
37+
name: Semantic Release
3838
if: "github.ref_name == 'main' && github.event_name != 'pull_request'"
3939
runs-on: ubuntu-latest
4040
permissions:
@@ -43,18 +43,11 @@ jobs:
4343
pull-requests: write # to be able to comment on released pull requests
4444
id-token: write # to enable use of OIDC for npm provenance
4545
steps:
46-
- name: Create GitHub token
47-
uses: actions/create-github-app-token@v1
48-
id: app-token
49-
with:
50-
app-id: ${{ vars.CI_APP_ID }}
51-
private-key: ${{ secrets.CI_PRIVATE_KEY }}
5246
- name: Checkout repository
5347
uses: actions/checkout@v4
5448
with:
55-
token: ${{ steps.app-token.outputs.token }}
56-
fetch-depth: 0 # for fetching tags, required for semantic-release
5749
persist-credentials: false
50+
fetch-depth: 0 # for fetching tags, required for semantic-release
5851
- name: Setup Node.js
5952
uses: actions/setup-node@v4
6053
with:
@@ -69,7 +62,13 @@ jobs:
6962
npm install
7063
- name: Verify the integrity of provenance attestations and registry signatures
7164
run: npm audit signatures
65+
- name: Create GitHub token
66+
uses: actions/create-github-app-token@v1
67+
id: app-token
68+
with:
69+
app-id: ${{ vars.CI_APP_ID }}
70+
private-key: ${{ secrets.CI_PRIVATE_KEY }}
7271
- name: Run semantic-release
7372
env:
74-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
73+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
7574
run: npm run semantic-release

0 commit comments

Comments
 (0)