Manual NPM Publish #2
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@v3 | |
with: | |
ref: ${{ github.event.inputs.branch }} | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
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}} |