From c70c49a4f24a30ec58fe6cc1ac9f0e4a4822e5a3 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Tue, 7 Nov 2023 19:05:34 -0800 Subject: [PATCH] ci: use --force install and add build permissions --- .github/workflows/release.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2593281403..f6ef7e669f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,8 +6,15 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "18.x" + registry-url: "https://registry.npmjs.org" - name: Publish package env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} @@ -15,6 +22,6 @@ jobs: # Currently, only npm supports publishing packages with provenance # https://docs.npmjs.com/generating-provenance-statements run: | - npm install + npm install --force npm run build:docs & npm run build:lib npm publish --provenance --access public