Workflow file for this run
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: 2. Publish to NPM (automatic)' | |
on: | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
workflow_call: | |
secrets: | |
PUBLISH_NPM: | |
required: true | |
permissions: | |
contents: read | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup and Build | |
uses: ./.github/actions/install-build | |
- name: Version | |
run: | | |
echo "VERSION=$(jq .version lerna.json)" >> $GITHUB_ENV | |
# See: https://github.com/lerna/lerna/tree/main/commands/publish#bump-from-package | |
- name: Publish to NPM | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.PUBLISH_NPM}} | |
DIST_TAG: ${{ contains(env.VERSION, 'alpha') && '--dist-tag next' || '' }} | |
run: pnpm lerna publish from-package --no-push --no-private --yes ${{ env.DIST_TAG }} |