Skip to content

Commit 03b4b71

Browse files
xrendanclaude
andcommitted
Keep registry-url but remove _authToken for OIDC
The registry-url is needed for npm to know about the registry, but the _authToken line prevents OIDC from working. Remove it with sed so npm falls back to OIDC authentication. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 95cd5ff commit 03b4b71

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

.github/workflows/npm-publish.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ jobs:
4343
uses: actions/setup-node@v4
4444
with:
4545
node-version: "22"
46+
registry-url: "https://registry.npmjs.org"
47+
48+
- name: Clear auth token for OIDC
49+
run: |
50+
# Remove the _authToken line so npm uses OIDC instead
51+
sed -i '/_authToken/d' ~/.npmrc
52+
cat ~/.npmrc
4653
4754
- name: Install dependencies
4855
run: bun install --frozen-lockfile
@@ -53,13 +60,6 @@ jobs:
5360
- name: Verify charts package can be packed
5461
run: cd packages/charts && npm pack --dry-run
5562

56-
- name: Debug npm config
57-
run: |
58-
echo "npm version: $(npm --version)"
59-
echo "node version: $(node --version)"
60-
npm config list
61-
cat ~/.npmrc 2>/dev/null || echo "No ~/.npmrc"
62-
6363
- name: Publish @buildcanada/charts
6464
run: cd packages/charts && npm publish --access public --provenance ${{ env.DRY_RUN }}
6565

@@ -82,6 +82,13 @@ jobs:
8282
uses: actions/setup-node@v4
8383
with:
8484
node-version: "22"
85+
registry-url: "https://registry.npmjs.org"
86+
87+
- name: Clear auth token for OIDC
88+
run: |
89+
# Remove the _authToken line so npm uses OIDC instead
90+
sed -i '/_authToken/d' ~/.npmrc
91+
cat ~/.npmrc
8592
8693
- name: Install dependencies
8794
run: bun install --frozen-lockfile
@@ -92,12 +99,5 @@ jobs:
9299
- name: Verify colours package can be packed
93100
run: cd packages/colours && npm pack --dry-run
94101

95-
- name: Debug npm config
96-
run: |
97-
echo "npm version: $(npm --version)"
98-
echo "node version: $(node --version)"
99-
npm config list
100-
cat ~/.npmrc 2>/dev/null || echo "No ~/.npmrc"
101-
102102
- name: Publish @buildcanada/colours
103103
run: cd packages/colours && npm publish --access public --provenance ${{ env.DRY_RUN }}

0 commit comments

Comments
 (0)