lerna publish #138
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: lerna publish | |
on: | |
workflow_dispatch: | |
inputs: | |
newversion: | |
description: "lerna publish {major,minor,patch}" | |
required: true | |
env: | |
node_version: 16 | |
git_email: [email protected] | |
jobs: | |
version_and_release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# fetch full history so things like auto-changelog work properly | |
fetch-depth: 0 | |
- name: Use Node.js ${{ env.node_version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.node_version }} | |
- run: npm i | |
- run: npm run bootstrap | |
# Run tests and cleanup | |
- run: npm test # block publishing on | |
- run: git reset --hard && git clean -fd | |
# configure git | |
- run: git config --global user.email "${{ env.git_email }}" | |
- run: git config --global user.name "${{ github.actor }}" | |
# publish to github and npm | |
- run: npm i lerna -g | |
- run: echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} > .npmrc | |
- run: lerna publish ${{ github.event.inputs.newversion }} -y --no-verify-access |