Skip to content

Commit 9f382ee

Browse files
committed
chore: ci workflow
1 parent 26fed43 commit 9f382ee

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

.github/workflows/publish_npm.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
1919
with:
2020
node-version: 22
21-
registry-url: 'https://registry.npmjs.org'
2221
- name: Update npm (required for OIDC trusted publishing)
2322
run: |
2423
corepack enable
@@ -31,17 +30,8 @@ jobs:
3130

3231
- name: Publish All Templates (OIDC trusted publishing)
3332
if: ${{ vars.USE_NPM_TOKEN != 'true' }}
34-
env:
35-
NODE_AUTH_TOKEN: ""
3633
run: |
3734
echo "Publishing templates to npm with tag $NPM_TAG via OIDC trusted publishing..."
38-
unset NODE_AUTH_TOKEN
39-
# Ensure we don't have token-based npm auth config lingering from setup-node
40-
rm -f ~/.npmrc
41-
if [ -n "${NPM_CONFIG_USERCONFIG:-}" ]; then
42-
rm -f "$NPM_CONFIG_USERCONFIG"
43-
unset NPM_CONFIG_USERCONFIG
44-
fi
4535
# run publish in every package; only ignore "already published" errors
4636
npx lerna exec --no-bail --stream --concurrency 1 -- "bash \"$GITHUB_WORKSPACE/.github/scripts/npm-publish-ci.sh\""
4737
@@ -51,5 +41,6 @@ jobs:
5141
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
5242
run: |
5343
echo "Publishing templates to npm with tag $NPM_TAG via granular token..."
44+
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
5445
# run publish in every package; only ignore "already published" errors
5546
npx lerna exec --no-bail --stream --concurrency 1 -- "bash \"$GITHUB_WORKSPACE/.github/scripts/npm-publish-ci.sh\""

0 commit comments

Comments
 (0)