From f644caf3ac4507f95cd8fe26c4046f5a36b4efbf Mon Sep 17 00:00:00 2001 From: Pionxzh Date: Tue, 10 Oct 2023 00:09:03 +0800 Subject: [PATCH] fix: fix publishing script and add provenance statements --- .github/workflows/release-please.yml | 18 +++++++++--------- .release-please-manifest.json | 2 +- package.json | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 7e9755eb..bfab4d69 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -20,13 +20,16 @@ jobs: needs: release-please if: ${{ needs.release-please.outputs.releases_created }} runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - name: Checkout repository uses: actions/checkout@v3 - name: Use Node.js LTS uses: actions/setup-node@v3 with: - node-version-file: '.nvmrc' + node-version: 18 cache: 'yarn' registry-url: 'https://registry.npmjs.org' - name: Get yarn cache directory path @@ -40,8 +43,7 @@ jobs: restore-keys: | ${{ runner.os }}-yarn-release - name: Install Dependencies - run: | - yarn install + run: yarn install - name: Prepack run: yarn run prepack - name: Build @@ -50,9 +52,7 @@ jobs: run: npm pkg delete scripts - name: Delete Workspaces run: npm pkg delete workspaces - - uses: JS-DevTools/npm-publish@v2 - name: Publish to npm - with: - access: 'public' - token: ${{ secrets.NPM_TOKEN }} - ignore-scripts: false + - name: Publish to npm + run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 95a37e3e..a3b1e29e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.2.0" + ".": "3.2.1" } diff --git a/package.json b/package.json index 1633ffd1..ceddea95 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@textea/json-viewer", "description": "Interactive Json Viewer, but not only a json viewer", - "version": "3.2.0", + "version": "3.2.1", "license": "MIT", "repository": { "type": "git",