Skip to content

Manual NPM Publish

Manual NPM Publish #2

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}}