diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index f6e61cb1..94c7a8be 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -93,6 +93,7 @@ jobs: - name: Upload prebuild for ${{ runner.os }}-${{ runner.arch }} uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 + if: github.ref == 'refs/heads/master' with: path: prebuilds/*.tar.gz name: artifact-${{ matrix.docker == true && matrix.alpine == true && 'linux-musl' || matrix.docker == true && matrix.alpine == false && 'linux' || matrix.os }}-${{ matrix.arch }} @@ -158,10 +159,10 @@ jobs: fetch-depth: 0 - name: Download prebuilds - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/master' uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 - - run: FETCH_ASSETS=true REPO=you54f/pact-js-core ./script/ci/check-release-libs.sh --fetch-assets -t - if: github.ref != 'refs/heads/master' + - run: FETCH_ASSETS=true REPO=you54f/pact-js-core ./script/ci/check-release-libs.sh --fetch-assets + if: github.ref != 'refs/heads/master' env: GITHUB_TOKEN: ${{ github.token }} diff --git a/script/ci/release.sh b/script/ci/release.sh index 2d778f29..e50187b1 100755 --- a/script/ci/release.sh +++ b/script/ci/release.sh @@ -91,7 +91,11 @@ else VERSION="$("$SCRIPT_DIR/lib/get-version.sh")" TAG="v${VERSION}" fi -echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" +export VERSION +set +eu +# GITHUB_OUPUT is unset if testing DRY_RUN locally +echo "VERSION=$VERSION" >> $GITHUB_OUTPUT +set -eu "$SCRIPT_DIR"/lib/publish.sh # Push the new commit back to the repo.