Skip to content

Commit 3288b2c

Browse files
Fix echo registry auth via .npmrc env var interpolation, restore registry-url
Root cause was npm config precedence: the project-level .npmrc (checked into the repo) always overrides user-level config, so its literal blank auth token lines were shadowing whatever the separate "npm config set" step wrote at the user level - regardless of registry-url on setup-node. - .npmrc now resolves tokens via ${ECHO_LIBRARIES_ACCESS_KEY} at read time instead of committing blank placeholders, so the project-level config itself carries valid auth. - Restored registry-url on setup-node in ci.yml/release.yml (safe now that .npmrc's interpolated values take precedence over it either way). - Removed the now-redundant "Configure echohq auth" npm config set steps. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent d9bd28f commit 3288b2c

3 files changed

Lines changed: 4 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@ jobs:
3434
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
3535
with:
3636
node-version: 22.11.0
37-
- name: Configure echohq auth (both hosts)
38-
env:
39-
ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }}
40-
run: |
41-
npm config set //npm.echohq.com/:_authToken "${ECHO_LIBRARIES_ACCESS_KEY}"
42-
npm config set //packages.echohq.com/:_authToken "${ECHO_LIBRARIES_ACCESS_KEY}"
37+
registry-url: https://npm.echohq.com/
4338
- run: npm ci
4439
env:
4540
ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }}

.github/workflows/release.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,7 @@ jobs:
9999
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
100100
with:
101101
node-version: 22.11.0
102-
103-
# CONFIGURE ECHOHQ AUTH
104-
- name: Configure echohq auth (both hosts)
105-
env:
106-
ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }}
107-
run: |
108-
npm config set //npm.echohq.com/:_authToken "${ECHO_LIBRARIES_ACCESS_KEY}"
109-
npm config set //packages.echohq.com/:_authToken "${ECHO_LIBRARIES_ACCESS_KEY}"
102+
registry-url: https://npm.echohq.com/
110103

111104
# CONFIGURE GITHUB PACKAGES AUTH FOR PUBLISH
112105
- name: Configure GitHub Packages auth

.npmrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Default registry for most packages
22
registry=https://npm.echohq.com/
3-
//npm.echohq.com/:_authToken=
4-
//packages.echohq.com/:_authToken=
3+
//npm.echohq.com/:_authToken=${ECHO_LIBRARIES_ACCESS_KEY}
4+
//packages.echohq.com/:_authToken=${ECHO_LIBRARIES_ACCESS_KEY}
55
always-auth=true
66
ignore-scripts=true

0 commit comments

Comments
 (0)