From c19ae891c7b8ab0285d27909f3fe5cd351029cae Mon Sep 17 00:00:00 2001 From: Vitalii Popov Date: Wed, 11 Nov 2026 15:33:27 +0100 Subject: [PATCH] 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 d9d3bd0b..70e9bb2a 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-beta env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}