5c: match the mark set's nesting on both sides of the round-trip
CI / gate (push) Successful in 8m35s
CI / publish (push) Has been skipped

This commit is contained in:
2026-09-04 08:53:00 +02:00
parent 0dfcc0f9ca
commit 67df1e2f4b
7 changed files with 52 additions and 24 deletions
+4 -2
View File
@@ -19,9 +19,11 @@ fi
name=$(read_field name)
version=$(read_field version)
published=$(published_version "$name" "$version")
tagged=$(git ls-remote --tags origin "v$version")
# Both steps observe their own end state, so a partial run converges on the next push to main.
if [ -z "$(published_version "$name" "$version")" ]; then
if [ -z "$published" ]; then
: "${NPM_TOKEN:?the publish needs NPM_TOKEN}"
in_image "$node_image" npm ci
in_image "$node_image" npm run build
@@ -29,7 +31,7 @@ if [ -z "$(published_version "$name" "$version")" ]; then
'printf "//registry.npmjs.org/:_authToken=%s\n" "$NPM_TOKEN" > "$HOME/.npmrc" && npm publish --access public'
fi
if [ -z "$(git ls-remote --tags origin "v$version")" ]; then
if [ -z "$tagged" ]; then
git tag "v$version"
git push origin "v$version"
fi