Skip to content

chore(): added token #5

chore(): added token

chore(): added token #5

Workflow file for this run

name: Publish
# Inspired by:
# https://dev.to/xcanchal/automatic-versioning-in-a-lerna-monorepo-using-github-actions-4hij
on:
pull_request:
types: [closed]
branches:
- master
jobs:
publish:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Use NodeJS 18"
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install
run: yarn install
- name: Run build
run: yarn build
- name: Run test
run: yarn test
- name: Run lint
run: yarn lint
- name: "Setup yarn"
run: |
yarn config set -H 'npmAuthToken' "${{secrets.GITHUB_TOKEN}}"
- name: "Version and publish"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
yarn dlx lerna version \
--conventional-commits \
--yes
yarn dlx lerna publish from-git \
--yes