From 714bb1114628aaf484596655420b6ab7c4b7983d Mon Sep 17 00:00:00 2001 From: Vitalii Popov Date: Wed, 11 Nov 2026 15:33:27 +0100 Subject: [PATCH 1/3] Run the before-publish build only in the publish run The step had no condition, so it ran on pull_request, merge_group, and the main run that commits the version bump. A block passes build:release here, and block-tools software build uploads binaries in that build. A PR run with a changeset version uploads the binaries of a version that is not released yet. When the PR changes its bump, that version stays in the registry. The later release finds the file, skips the upload with a warning, and ships the old binaries. clonotype-clustering: PR #156 run 39406490270 uploaded software 4.3.0 from 4.2.1 code. Release 4.3.0 (PR #163) skipped the upload and shipped those files. Use the condition of the npm pack step: main, with no version-bump changes left. --- .github/workflows/node-simple-pnpm.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/node-simple-pnpm.yaml b/.github/workflows/node-simple-pnpm.yaml index 099d1000..4cb2d864 100644 --- a/.github/workflows/node-simple-pnpm.yaml +++ b/.github/workflows/node-simple-pnpm.yaml @@ -1052,6 +1052,8 @@ jobs: test-results-reports: ${{ inputs.test-results-reports }} - name: Run build (before publish) + if: github.ref_name == 'main' + && steps.check-changes.outputs.has-changes == '0' uses: milaboratory/github-ci/blocks/monorepo/build-and-test-pnpm@v4 env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ab6c6d1dad79995c90134c31c6b34e912b881bd0 Mon Sep 17 00:00:00 2001 From: Vitalii Popov Date: Wed, 11 Nov 2026 15:36:20 +0100 Subject: [PATCH 2/3] Explain why the before-publish build runs only in the publish run --- .github/workflows/node-simple-pnpm.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/node-simple-pnpm.yaml b/.github/workflows/node-simple-pnpm.yaml index 4cb2d864..10f98c55 100644 --- a/.github/workflows/node-simple-pnpm.yaml +++ b/.github/workflows/node-simple-pnpm.yaml @@ -1051,6 +1051,8 @@ jobs: test-coverage-reports: ${{ inputs.test-coverage-reports }} test-results-reports: ${{ inputs.test-results-reports }} + # The build script can upload binaries under the release version. Run it only in + # the publish run: an earlier upload takes the version, and the release skips it. - name: Run build (before publish) if: github.ref_name == 'main' && steps.check-changes.outputs.has-changes == '0' From ebc64eda4d63d246b444fe47401f612620a66b12 Mon Sep 17 00:00:00 2001 From: Vitalii Popov Date: Wed, 11 Nov 2026 16:19:10 +0100 Subject: [PATCH 3/3] Install bats from npm in the npm split publish test On the ubuntu-26.04 runner image 20261101, apt cannot resolve the Ubuntu archive hosts, and the Install bats step fails. The npm registry resolves on the same runner. The npm package has the same version, 1.13.0, that apt installed on image 20261025. --- .github/workflows/0-test-npm-publish-split.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/0-test-npm-publish-split.yaml b/.github/workflows/0-test-npm-publish-split.yaml index 83dac608..14c3d516 100644 --- a/.github/workflows/0-test-npm-publish-split.yaml +++ b/.github/workflows/0-test-npm-publish-split.yaml @@ -74,7 +74,7 @@ jobs: ./node_modules/.bin/vitest run test/pack.test.ts - name: Install bats - run: sudo apt-get update && sudo apt-get install -y bats + run: npm install --global bats@1.13.0 && bats --version - name: npm-trust-setup working-directory: .