Manual NPM Publish #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Manual NPM Publish | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: "Version to publish" | |
required: true | |
default: "beta" | |
branch: | |
description: "Branch to publish from" | |
required: true | |
default: "develop" | |
dry-run: | |
description: "Run without publishing" | |
required: false | |
default: "true" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: ["cli", "util"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.branch }} | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9.1.4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- run: pnpm install | |
- run: pnpm run build | |
- uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
tag: ${{ github.event.inputs.tag }} | |
package: packages/${{ matrix.package }} | |
dry-run: ${{ github.event.inputs.dry-run}} |