Skip to content

Commit 341e045

Browse files
ci(core): enable tag push and npm publish in release workflow
1 parent 953b8ab commit 341e045

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ on:
1818
default: 'main'
1919

2020
permissions:
21+
# Needed for pushing git tags during release
22+
contents: write
23+
# Kept for npm provenance/OIDC if used
2124
id-token: write
2225

2326
jobs:
@@ -32,6 +35,8 @@ jobs:
3235
with:
3336
fetch-depth: 25
3437
ref: ${{ github.event.inputs.branch }}
38+
# Use repo-scoped token so pushing tags always works
39+
token: ${{ secrets.REPO_SCOPED_TOKEN }}
3540

3641
# Use corepack to install pnpm
3742
- name: Setup Pnpm
@@ -72,7 +77,9 @@ jobs:
7277
return 'v' + packageJson.version;
7378
7479
- name: Publish to npm
80+
env:
81+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7582
run: |
7683
git tag ${{ steps.version_to_release.outputs.result }}
7784
git push origin ${{ steps.version_to_release.outputs.result }}
78-
pnpm -r publish --tag ${{ github.event.inputs.npm_tag }} --publish-branch ${{ github.event.inputs.branch }}
85+
pnpm -r publish --tag ${{ github.event.inputs.version }} --publish-branch ${{ github.event.inputs.branch }}

0 commit comments

Comments
 (0)