chore(dependencies): update dependency lerna to v8 #496
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: Build and Publish packages | |
on: | |
pull_request: | |
branches: | |
- '*' | |
push: | |
branches: | |
- master | |
env: | |
CI: true | |
jobs: | |
build: | |
# ignore commits with `[skip ci]` | |
if: contains(github.event.head_commit.message, '[skip ci]') != true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
cache-dependency-path: 'packages/*/package-lock.json' | |
- run: npm ci | |
# Publish packages if running on main branch | |
- name: Configure services | |
if: github.ref == 'refs/heads/master' | |
run: | | |
git config --global user.email "$GIT_AUTHOR_EMAIL" | |
git config --global user.name "$GIT_AUTHOR_NAME" | |
git remote set-url origin "https://[email protected]/$GITHUB_REPOSITORY.git" > /dev/null 2>&1 | |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc 2> /dev/null | |
env: | |
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} | |
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish packages | |
if: success() && (github.ref == 'refs/heads/master') | |
run: npx lerna publish --yes --no-verify-access | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |