Skip to content
Merged
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
14 changes: 12 additions & 2 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ on:
required: false
default: 'production'
type: string
tag:
description: 'NPM publish tag (e.g., latest, nightly)'
required: false
default: ''
type: string
secrets:
npm-token:
description: 'NPM token for authentication'
Expand Down Expand Up @@ -63,10 +68,15 @@ jobs:

- name: Publish package
run: |
TAG_OPTION=""
if [ -n "${{ inputs.tag }}" ]; then
TAG_OPTION="--tag ${{ inputs.tag }}"
fi

if [ "${{ inputs.provenance }}" = "true" ]; then
npm publish --access ${{ inputs.access }} --provenance
npm publish --access ${{ inputs.access }} $TAG_OPTION --provenance
else
npm publish --access ${{ inputs.access }}
npm publish --access ${{ inputs.access }} $TAG_OPTION
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.npm-token }}