name: Publish on: workflow_call: inputs: package-path: description: Path to the package directory (e.g. packages/terminal-progress) type: string required: true tag: description: npm dist-tag to publish under type: string default: latest workflow_dispatch: inputs: package-path: description: Path to the package directory (e.g. packages/terminal-progress) type: string required: true tag: description: npm dist-tag to publish under type: string default: latest permissions: contents: read id-token: write jobs: publish: name: Publish to npm runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: jdx/mise-action@924e7c586e33d7d4bae9c14e26c5d22e2beb6e78 # v5.3.0 - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: lts/* registry-url: https://registry.npmjs.org - name: Install dependencies run: mise run setup - name: Build run: mise run build "$(basename "${{ inputs.package-path }}")" - name: Stage run: npm stage publish --access public --provenance --tag ${{ inputs.tag }} working-directory: ${{ inputs.package-path }}