Skip to content

Commit 99f8ef9

Browse files
committed
ci(release): publish straight to latest; drop the dist-tag sync step
Two corrections to the release channel plan: - An explicit --tag latest satisfies npm's prerelease guard (verified with publish --dry-run), so there is no need to publish under a separate bridge tag and sync latest afterwards. - The sync step would have failed anyway: npm trusted publishing (OIDC) covers only — bridge: 6.0.3-bridge.0.tsgo.7.0.2 latest: 6.0.3-bridge.0.tsgo.7.0.2 requires a registry token, which this workflow deliberately does not have. latest is the release channel while the bridge line is the only real content; the existing tag remains as an alias for the bridge.0 line.
1 parent c2d7486 commit 99f8ef9

1 file changed

Lines changed: 6 additions & 18 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -173,34 +173,22 @@ jobs:
173173
set -euo pipefail
174174
for d in subpkgs/*; do
175175
echo "== publishing $(basename "$d") =="
176-
(cd "$d" && npm publish --provenance --tag bridge)
176+
(cd "$d" && npm publish --provenance --tag latest)
177177
done
178178
env:
179179
# Empty when the secret is unset: npm then falls back to OIDC trusted publishing.
180180
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
181181

182182
- name: Publish main package
183-
# --tag bridge: the version is a semver prerelease (x.y.z-bridge.N…);
184-
# npm refuses to publish prereleases to the implicit `latest` tag.
185-
run: npm publish --provenance --tag bridge
183+
# --tag latest: the version is a semver prerelease (x.y.z-bridge.N…),
184+
# so npm requires an EXPLICIT tag (default would be rejected), but an
185+
# explicit `latest` is accepted. latest is the release channel until a
186+
# stable line exists; `bridge` stays as an alias for the bridge.0 line.
187+
run: npm publish --provenance --tag latest
186188
working-directory: staging
187189
env:
188190
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
189191

190-
- name: Point latest at the release
191-
# The bridge line is the only real content today; keep `latest` in sync
192-
# so bare `npm i` never resolves to a stale placeholder (issue #8).
193-
# dist-tag add needs no OTP under trusted publishing/OIDC.
194-
run: |
195-
set -euo pipefail
196-
V="$(node -p "require('./staging/package.json').version")"
197-
npm dist-tag add "typescript-native-bridge@$V" latest
198-
for p in darwin-arm64 darwin-x64 linux-x64 linux-arm64 linux-arm win32-x64 win32-arm64; do
199-
npm dist-tag add "@typescript-native-bridge/$p@$V" latest
200-
done
201-
env:
202-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
203-
204192
- name: Create GitHub Release
205193
run: gh release create "${GITHUB_REF_NAME}" --generate-notes --verify-tag
206194
env:

0 commit comments

Comments
 (0)