Publish packages to npm #55
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 packages to npm | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
type: choice | |
description: 'Version to publish' | |
required: true | |
default: patch | |
options: | |
- patch | |
- minor | |
- major | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
registry-url: 'https://registry.npmjs.org' | |
- run: git config --global user.email "[email protected]" | |
- run: git config --global user.name "De-Great Yartey" | |
- name: Install dependencies | |
run: yarn boot | |
- name: Turbo+Build | |
run: yarn build | |
- name: Test | |
run: yarn test | |
- name: Bump version | |
run: npx lerna version ${{ github.event.inputs.version }} --conventional-commits --yes --no-private | |
- name: Publish | |
run: npx lerna publish from-package --yes --no-private | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |