diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index c3daaac..5ac92aa 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -1,4 +1,4 @@ -name: Publish Package to npmjs +name: Stage Package for npmjs permissions: contents: read on: @@ -60,9 +60,10 @@ jobs: if-no-files-found: error retention-days: 7 - publish: + stage: needs: build runs-on: ubuntu-latest + environment: npm timeout-minutes: 10 permissions: id-token: write @@ -79,7 +80,11 @@ jobs: package-manager-cache: false registry-url: https://registry.npmjs.org/ - - name: Publish to npm - run: npm publish ./package.tgz --ignore-scripts --provenance --access public --tag "$NPM_DIST_TAG" + # Staged publishing requires npm >=11.15.0. + - name: Install npm + run: npm install --global npm@11.19.1 + + - name: Stage for npm publishing + run: npm stage publish ./package.tgz --ignore-scripts --provenance --access public --tag "$NPM_DIST_TAG" env: NPM_DIST_TAG: ${{ github.event.release.prerelease && 'next' || 'latest' }} diff --git a/package.json b/package.json index 3e555f1..714ab8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "narou", - "version": "2.0.1", + "version": "2.1.0", "description": "Narou API Wrapper", "repository": { "type": "git",