Skip to content

Publish new version #668

Publish new version

Publish new version #668

Workflow file for this run

name: Publish new version
on:
workflow_run:
workflows: [ "Test" ]
branches:
- main
types:
- completed
jobs:
npm-publish:
name: npm-publish
runs-on: ubuntu-latest
if: |
github.event.workflow_run.conclusion == 'success' &&
contains(github.event.workflow_run.head_commit.message, 'chore: publish')
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
- name: Prepare
uses: ./.github/actions/checkout-install
- name: Publish with Lerna
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
DOCS_NPM_TOKEN: ${{ secrets.DOCS_NPM_TOKEN }}
run: |
pnpm -C packages/cli build
[ -d "packages/vitepress" ] && pnpm -C packages/vitepress build || true
pnpm config set //registry.npmjs.org/:_authToken ${NPM_AUTH_TOKEN}
pnpm publish --access public --no-git-checks
pnpm config set //registry.npmjs.org/:_authToken ${DOCS_NPM_TOKEN}
pnpm publish packages/cli --access public --no-git-checks
pnpm publish packages/storybook --access public --no-git-checks
pnpm publish packages/vitepress --access public --no-git-checks
pnpm publish packages/vitest --access public --no-git-checks
#npx lerna publish -y from-git