-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (35 loc) · 1.17 KB
/
auto-publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Publish new version
on:
workflow_run:
workflows: [ "Test" ]
branches:
- main
- DX-frontends
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@v3
- 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
pnpm config set //registry.npmjs.org/:_authToken ${NPM_AUTH_TOKEN}
pnpm publish --access public
pnpm config set //registry.npmjs.org/:_authToken ${DOCS_NPM_TOKEN}
pnpm publish packages/cli --access public
pnpm publish packages/storybook --access public
pnpm publish packages/vitepress --access public
pnpm publish packages/vitest --access public
#npx lerna publish -y from-git