ci: use mounted npmrc for pnpm publish
All checks were successful
CI — Common Platform / Build, Test & Typecheck (push) Successful in 2m9s
Publish @bytelyst/* packages / publish (push) Successful in 2m39s

This commit is contained in:
root 2026-05-25 06:14:34 +00:00
parent b46d4ba0b6
commit c7f6b981f1

View File

@ -99,10 +99,13 @@ jobs:
pnpm --filter "$name" test pnpm --filter "$name" test
(cd "$dir" && pnpm pack --pack-destination /tmp/tarballs) (cd "$dir" && pnpm pack --pack-destination /tmp/tarballs)
if [ "$DRY_RUN" = "true" ]; then if [ "$DRY_RUN" = "true" ]; then
echo "DRY RUN: skipping publish for $name@$version" echo "DRY RUN: would publish $name@$version"
else else
(cd "$dir" && pnpm publish --no-git-checks --userconfig /tmp/publish.npmrc --registry https://gitea.bytelyst.com/api/packages/bytelyst/npm/) cp /tmp/publish.npmrc "$dir/.npmrc"
npm view "$name@$version" dist.shasum --userconfig /tmp/publish.npmrc --registry https://gitea.bytelyst.com/api/packages/bytelyst/npm/ trap 'rm -f "$dir/.npmrc"' EXIT
(cd "$dir" && pnpm publish --no-git-checks --registry https://gitea.bytelyst.com/api/packages/bytelyst/npm/)
rm -f "$dir/.npmrc"
npm view "$name@$version" version dist.shasum dist.tarball --userconfig /tmp/publish.npmrc --registry https://gitea.bytelyst.com/api/packages/bytelyst/npm/
fi fi
done < /tmp/packages-to-publish.tsv done < /tmp/packages-to-publish.tsv