Skip to content

chore: version packages #143

chore: version packages

chore: version packages #143

Workflow file for this run

name: publish
on:
push:
branches:
- main
tags-ignore:
- '**'
paths-ignore:
- '**.md'
workflow_dispatch:
jobs:
pre-run:
uses: ./.github/workflows/pre-run.yml
secrets: inherit
publish:
runs-on: ubuntu-latest
needs: pre-run
if: "needs.pre-run.outputs.is-not-fork == 'true' && (github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, 'chore: version packages'))"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- run: npm install -g npm@latest
- run: npm ci
- run: npm run bootstrap
- run: npm run build
- run: git config --local user.email '[email protected]'
- run: git config --local user.name 'GitHub Action'
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish
run: |
npx lerna publish from-package --no-verify-access --yes
RELEASE=$(cat lerna.json | jq -r '.version')
git tag -a v$RELEASE -m v$RELEASE
git push origin v$RELEASE