Skip to content

Commit 6040bca

Browse files
jaggujiclaude
andauthored
fix(ci): publish with explicit --tag latest for 1:1 downgrade (#75)
The first 1:1 release (0.0.36) is lower than the legacy 1.0.2 already on npm, so `npm publish` refuses to move the `latest` dist-tag implicitly and exits 1. Pass --tag latest explicitly on both the npm and GitHub Packages publishes. Needed for every 0.0.x release until blend crosses 1.0. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 96a7da1 commit 6040bca

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,15 @@ jobs:
9191
echo "exists=false" >> $GITHUB_OUTPUT
9292
fi
9393
94+
# --tag latest is REQUIRED: with 1:1 versioning the version (e.g. 0.0.36) is
95+
# lower than the legacy 1.0.2 already on npm, so npm refuses to move the
96+
# `latest` dist-tag implicitly. We set it explicitly — 0.0.x is the current
97+
# line; the old 1.x is superseded (deprecate it separately if desired).
9498
- name: Publish to npm with OIDC provenance
9599
if: steps.npm.outputs.exists == 'false'
96100
run: |
97101
echo "Publishing ${{ steps.meta.outputs.version }} to npm with OIDC provenance..."
98-
npm publish --provenance --access public
102+
npm publish --provenance --access public --tag latest
99103
echo "Published to npm successfully!"
100104
101105
# Tag AFTER a successful npm publish, and tolerate an existing tag, so a
@@ -130,7 +134,7 @@ jobs:
130134
exit 0
131135
fi
132136
echo "Publishing to GitHub Packages..."
133-
npm publish --access public --no-git-checks --registry https://npm.pkg.github.com
137+
npm publish --access public --no-git-checks --tag latest --registry https://npm.pkg.github.com
134138
echo "Published to GitHub Packages successfully!"
135139
env:
136140
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)