@@ -121,12 +121,17 @@ jobs:
121121 - name : Install dependencies
122122 run : yarn install
123123 - name : Build in docker
124- uses : addnab/docker-run-action@v3
125124 if : ${{ matrix.settings.docker }}
126- with :
127- image : ${{ matrix.settings.docker }}
128- options : " --user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build"
129- run : ${{ matrix.settings.build }}
125+ run : |
126+ docker run --rm \
127+ --user 0:0 \
128+ -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db \
129+ -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache \
130+ -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index \
131+ -v ${{ github.workspace }}:/build \
132+ -w /build \
133+ ${{ matrix.settings.docker }} \
134+ /bin/sh -c "${{ matrix.settings.build }}"
130135 - name : Build
131136 run : ${{ matrix.settings.build }}
132137 if : ${{ !matrix.settings.docker }}
@@ -267,14 +272,13 @@ jobs:
267272 platforms : arm64
268273 - run : docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
269274 - name : Setup and run tests
270- uses : addnab/docker-run-action@v3
271- with :
272- image : node:${{ matrix.node }}-slim
273- options : " --platform linux/arm64 -v ${{ github.workspace }}:/build -w /build"
274- run : |
275- set -e
276- yarn test
277- ls -la
275+ run : |
276+ docker run --rm \
277+ --platform linux/arm64 \
278+ -v ${{ github.workspace }}:/build \
279+ -w /build \
280+ node:${{ matrix.node }}-slim \
281+ /bin/sh -c "set -e && yarn test && ls -la"
278282 test-linux-aarch64-musl-binding :
279283 name : Test bindings on aarch64-unknown-linux-musl - node@${{ matrix.node }}
280284 needs :
@@ -301,13 +305,13 @@ jobs:
301305 platforms : arm64
302306 - run : docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
303307 - name : Setup and run tests
304- uses : addnab/docker-run-action@v3
305- with :
306- image : node:lts-alpine
307- options : " --platform linux/arm64 -v ${{ github.workspace }}:/build -w /build "
308- run : |
309- set -e
310- yarn test
308+ run : |
309+ docker run --rm \
310+ --platform linux/arm64 \
311+ -v ${{ github.workspace }}:/build \
312+ -w /build \
313+ node:lts-alpine \
314+ /bin/sh -c "set -e && yarn test"
311315 universal-macOS :
312316 name : Build universal macOS binary
313317 needs :
@@ -326,14 +330,16 @@ jobs:
326330 uses : actions/download-artifact@v4
327331 with :
328332 name : bindings-x86_64-apple-darwin
329- path : artifacts
333+ path : .
330334 - name : Download macOS arm64 artifact
331335 uses : actions/download-artifact@v4
332336 with :
333337 name : bindings-aarch64-apple-darwin
334- path : artifacts
338+ path : .
335339 - name : Combine binaries
336- run : yarn universal
340+ run : |
341+ ls -R .
342+ yarn universal
337343 - name : Upload artifact
338344 uses : actions/upload-artifact@v4
339345 with :
@@ -370,15 +376,15 @@ jobs:
370376 shell : bash
371377 - name : Publish
372378 run : |
373- # npm config set provenance true
379+ npm config set provenance true
374380 if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
375381 then
376382 echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
377- npm publish --access public
383+ npm publish --access public --provenance
378384 elif git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+";
379385 then
380386 echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
381- npm publish --tag next --access public
387+ npm publish --tag next --access public --provenance
382388 else
383389 echo "Not a release, skipping publish"
384390 fi
0 commit comments