Skip to content

Commit b486ca8

Browse files
committed
bug #2954 [CI] Fix npm releases with pnpm (Kocal)
This PR was merged into the 2.x branch. Discussion ---------- [CI] Fix npm releases with pnpm | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | no <!-- required for new features --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT Given https://docs.npmjs.com/using-private-packages-in-a-ci-cd-workflow, https://pnpm.io/using-changesets#add-a-publish-script, or pnpm/pnpm#3141 It should works better now. ⚠️ no need to release a 2.28.2 right now, I already manually published packages on npm for 2.28.1 version Commits ------- 4061a42 [CI] Fix npm releases with pnpm
2 parents 02b8005 + 4061a42 commit b486ca8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/release-on-npm.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,12 @@ jobs:
4040
git add .
4141
git commit -m "Update versions to ${{ env.VERSION }}"
4242
43-
- name: Publish on NPM
43+
- name: Configure NPM authentication
44+
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
4445
env:
45-
NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
46+
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
47+
48+
- name: Publish on NPM
4649
run: pnpm publish --recursive --access public --no-git-checks
4750

4851
- name: Push changes

0 commit comments

Comments
 (0)