actions/setup-node's registry-url sets the *default* npm registry for every install, not just publishing - since triggershell is an unscoped package name, that meant `pnpm install` tried to fetch every ordinary dependency (zod, typescript, ws, ...) from dev.pivoine.art/api/packages/valknar/npm/ instead of the public npm registry, and got hammered with 429s retrying each one. Removes registry-url from setup-node entirely (installs go back to the default public registry) and instead scopes the auth token to just that one registry host+path via `pnpm config set "//dev.pivoine.art/api/packages/valknar/npm/:_authToken" ...` right before the publish step - publishConfig.registry in package.json already tells `pnpm publish` specifically where to go (verified locally via `pnpm publish --dry-run` earlier), this only supplies the matching credential without touching install resolution. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,6 @@ jobs:
|
|||||||
- uses: https://github.com/actions/setup-node@v4
|
- uses: https://github.com/actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
registry-url: https://dev.pivoine.art/api/packages/valknar/npm/
|
|
||||||
|
|
||||||
- run: pnpm install --frozen-lockfile
|
- run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
@@ -31,7 +30,13 @@ jobs:
|
|||||||
- name: Set package version from the tag
|
- name: Set package version from the tag
|
||||||
run: npm pkg set version="${GITHUB_REF_NAME#v}"
|
run: npm pkg set version="${GITHUB_REF_NAME#v}"
|
||||||
|
|
||||||
|
# Scoped to this one registry host+path (via publishConfig.registry in package.json) rather
|
||||||
|
# than actions/setup-node's registry-url, which would set it as the *default* registry for
|
||||||
|
# every install - breaking `pnpm install` for this project's own (unscoped, public) deps.
|
||||||
|
- name: Configure registry auth for publish
|
||||||
|
run: pnpm config set "//dev.pivoine.art/api/packages/valknar/npm/:_authToken" "$PACKAGE_TOKEN"
|
||||||
|
env:
|
||||||
|
PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
|
||||||
|
|
||||||
- name: Publish to Gitea npm registry
|
- name: Publish to Gitea npm registry
|
||||||
run: pnpm publish --no-git-checks
|
run: pnpm publish --no-git-checks
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user