-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (37 loc) · 1.09 KB
/
publish.yml
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
40
41
42
43
name: Publish
on:
pull_request:
types: [closed]
branches:
- development
- main
jobs:
publish:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Checkout all branches and tags
- name: "Use NodeJS 18"
uses: actions/setup-node@v3
with:
node-version: '18.x'
# Build and test
- run: npm -v
- run: npm install --no-package-lock
- run: npm run build
- run: npm test
- name: "Git Config"
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
git config advice.addIgnoredFile false
- name: "Lerna Version & Publish"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm set //registry.npmjs.org/:_authToken=${{ secrets.NPMJS_TOKEN }}
npm whoami
npx lerna version --conventional-commits --yes
npx lerna publish from-git --yes --no-verify-access