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: . diff --git a/.github/workflows/node-simple-pnpm.yaml b/.github/workflows/node-simple-pnpm.yaml index 099d1000..10f98c55 100644 --- a/.github/workflows/node-simple-pnpm.yaml +++ b/.github/workflows/node-simple-pnpm.yaml @@ -1051,7 +1051,11 @@ 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' uses: milaboratory/github-ci/blocks/monorepo/build-and-test-pnpm@v4 env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}