Skip to content

Commit 18a6ae5

Browse files
committed
chore: configure npm authentication in GitHub Actions workflow
- Add a step to the GitHub Actions workflow to set up npm authentication using the NPM_AUTH_TOKEN secret. - Ensure the changeset:publish:pre-release script in package.json uses the correct NPM tag format. Signed-off-by: Odin Thomas Rochmann <odin.rochmann@gmail.com>
1 parent 1e7d642 commit 18a6ae5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/next.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ jobs:
3636
- name: Setup node and install deps
3737
uses: ./.github/workflows/actions/node-setup
3838

39+
- name: Config npm auth
40+
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_AUTH_TOKEN}"
41+
env:
42+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
43+
3944
- name: Create Release Pull Request or Publish to npm
4045
id: changesets
4146
uses: changesets/action@v1

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"lerna:dedupe": "lernaupdate --dedupe",
3535
"changeset:version": "changeset version && pnpm install --lockfile-only",
3636
"changeset:publish": "pnpm changeset tag && pnpm publish -r --no-git-checks",
37-
"changeset:publish:pre-release": "pnpm publish -r --no-git-checks --report-summary --tag ${NPM_TAG:-preview}"
37+
"changeset:publish:pre-release": "pnpm publish -r --no-git-checks --report-summary --tag ${NPM_TAG}"
3838
},
3939
"repository": {
4040
"type": "git",

0 commit comments

Comments
 (0)