Skip to content

fix(deps): update dependency vitest to ^2.1.8 #64

fix(deps): update dependency vitest to ^2.1.8

fix(deps): update dependency vitest to ^2.1.8 #64

Workflow file for this run

name: Publish
# Inspired by:
# https://dev.to/xcanchal/automatic-versioning-in-a-lerna-monorepo-using-github-actions-4hij
# Problems:
# I tried to use github registry to publish public packages,
# but packages in github require auth to install even if package is public.
#
# Lerna use npm for publish, even if npm client is set to yarn
# Publish only use npm as client and it ignore any config in yarnrc and npmClient settings
#
# Npm token will not be configured without registry-url set in actions/setup-node
# To configure authToken for npm both registry-url and secret is needed.
#
# When publishing public package, publishConfig.access need to be configured
#
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@v4
with:
fetch-depth: 0
- name: "Use NodeJS 22"
uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- name: Install
run: yarn install
- name: Run build
run: yarn build
- name: Run test
run: yarn test
- name: Run lint
run: yarn lint
- name: "Version and publish"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Set git user"
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
echo "Version"
yarn lerna version \
--conventional-commits \
--yes
echo "Publish"
yarn lerna publish from-git \
--loglevel debug \
--yes