Skip to content

Commit

Permalink
feat(cli): add provenance to ci template (#1671)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Jul 27, 2023
1 parent 5875378 commit 9ebe404
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cli/src/api/templates/ci-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ env:
DEBUG: 'napi:*'
MACOSX_DEPLOYMENT_TARGET: '10.13'
permissions:
contents: write
id-token: write
on:
push:
branches:
Expand Down Expand Up @@ -390,6 +394,10 @@ jobs:
name: Test bindings on aarch64-unknown-linux-musl - node@\${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
node: ['16', '18']
runs-on: ubuntu-latest
Expand Down Expand Up @@ -421,7 +429,7 @@ jobs:
- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
image: node:lts-alpine
image: node:\${{ matrix.node }}-alpine
options: --platform linux/arm64 -v \${{ github.workspace }}:/build -w /build
run: |
set -e
Expand Down Expand Up @@ -548,6 +556,7 @@ jobs:
- name: Publish
run: |
npm config set provenance true
if git log -1 --pretty=%B | grep "^[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+$";
then
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
Expand Down

0 comments on commit 9ebe404

Please sign in to comment.