@@ -64,33 +64,36 @@ jobs:
6464
6565 steps :
6666 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
67+ if : github.ref == 'refs/heads/master'
6768 with :
6869 fetch-depth : 0
6970
7071 - name : Use Node.js ${{ env.NODE_VERSION }}
7172 uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
73+ if : github.ref == 'refs/heads/master'
7274 with :
7375 node-version : ${{ env.NODE_VERSION }}
7476
75- - if : runner.os == 'Windows'
77+ - if : ${{ runner.os == 'Windows' && github.ref == 'refs/heads/master'}}
7678 run : echo "ONLY_DOWNLOAD_PACT_FOR_WINDOWS=true" >> $GITHUB_ENV
7779
78- - if : ${{ matrix.docker == true && matrix.alpine == true }}
80+ - if : ${{ matrix.docker == true && matrix.alpine == true && github.ref == 'refs/heads/master' }}
7981 name : prebuild linux ${{ matrix.arch }} musl
8082 run : docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:20-alpine bin/sh -c 'apk add bash && cd /home && bash -c "/home/script/ci/prebuild-alpine.sh" && rm -rf ffi node_modules'
8183
82- - if : ${{ matrix.docker == true && matrix.alpine != true }}
84+ - if : ${{ matrix.docker == true && matrix.alpine != true && github.ref == 'refs/heads/master' }}
8385 name : prebuild linux ${{ matrix.arch }}
8486 run : docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:20 bin/bash -c 'cd /home && /home/script/ci/prebuild.sh && rm -rf ffi node_modules'
8587
8688 - run : sudo chown -R $(id -u):$(id -g) prebuilds
87- if : ${{ matrix.docker == true }}
89+ if : ${{ matrix.docker == true && github.ref == 'refs/heads/master' }}
8890
8991 - run : ./script/ci/prebuild.sh
90- if : ${{ matrix.docker != true }}
92+ if : ${{ matrix.docker != true && github.ref == 'refs/heads/master' }}
9193
9294 - name : Upload prebuild for ${{ runner.os }}-${{ runner.arch }}
9395 uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
96+ if : github.ref == 'refs/heads/master'
9497 with :
9598 path : prebuilds/*.tar.gz
9699 name : artifact-${{ matrix.docker == true && matrix.alpine == true && 'linux-musl' || matrix.docker == true && matrix.alpine == false && 'linux' || matrix.os }}-${{ matrix.arch }}
@@ -156,7 +159,12 @@ jobs:
156159 fetch-depth : 0
157160
158161 - name : Download prebuilds
162+ if : github.ref == 'refs/heads/master'
159163 uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
164+ - run : FETCH_ASSETS=true REPO=pact-foundation/pact-js-core ./script/ci/check-release-libs.sh --fetch-assets
165+ if : github.ref != 'refs/heads/master'
166+ env :
167+ GITHUB_TOKEN : ${{ github.token }}
160168
161169 - name : Use Node.js ${{ env.NODE_VERSION }}
162170 uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
@@ -173,11 +181,11 @@ jobs:
173181
174182 - if : ${{ matrix.docker == true && matrix.alpine == true && matrix.arch == 'amd64' && matrix.os == 'ubuntu-latest' }}
175183 name : test linux amd64 musl
176- run : docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:${{ matrix.node-version }}-alpine bin/sh -c 'apk add bash curl gcompat file && cd /home && /home/script/ci/unpack-and-test.sh'
184+ run : docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:${{ matrix.node-version }}-alpine bin/sh -c 'apk add jq gettext-envsubst bash curl gcompat file && cd /home && /home/script/ci/unpack-and-test.sh'
177185
178186 - if : ${{ matrix.docker == true && matrix.alpine == true && matrix.arch == 'arm64' && matrix.os == 'ubuntu-24.04-arm' }}
179187 name : test linux arm64 musl
180- run : docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:${{ matrix.node-version }}-alpine bin/sh -c 'apk add bash curl file protoc protobuf-dev && cd /home && /home/script/ci/unpack-and-test.sh'
188+ run : docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:${{ matrix.node-version }}-alpine bin/sh -c 'apk add jq gettext-envsubst bash curl file protoc protobuf-dev && cd /home && /home/script/ci/unpack-and-test.sh'
181189
182190 release_dry_run :
183191 runs-on : ubuntu-latest
0 commit comments