Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Package to npmjs
name: Stage Package for npmjs
permissions:
contents: read
on:
Expand Down Expand Up @@ -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
Expand All @@ -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' }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "narou",
"version": "2.0.1",
"version": "2.1.0",
"description": "Narou API Wrapper",
"repository": {
"type": "git",
Expand Down
Loading