Publish to NPM #3
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: Publish to NPM | |
on: | |
workflow_dispatch: | |
inputs: | |
dry_run: | |
description: 'Dry Run' | |
type: boolean | |
default: true | |
workflow_call: | |
secrets: | |
PUBLISH_NPM: | |
required: true | |
permissions: | |
contents: read | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- run: | | |
pnpm i | |
pnpm build | |
# Release Please has already incremented versions and published tags, so we just | |
# need to publish all unpublished versions to NPM here | |
# See: https://github.com/lerna/lerna/tree/main/commands/publish#bump-from-package | |
- name: Publish to NPM | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.PUBLISH_NPM}} | |
run: pnpm publish packages/perf-bench ${{ (inputs.dry_run && '--dry-run') || '' }} |