-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (52 loc) · 1.63 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Publish
on:
release:
types: [published]
push:
branches:
- master
jobs:
publish:
if: "!(contains(github.event.head_commit.message, 'chore(release):') || contains(github.event.head_commit.message, 'origin/master'))" # Exclude release bump commits
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # Use the PAT for checkout
fetch-depth: '0'
- uses: actions/setup-node@v3
with:
node-version: '22'
- name: Install dependencies
run: npm ci
- name: Run linter test
run: lerna run lint
- name: Run circular dependency test
run: lerna run check
- name: Run compile test
run: lerna run compile
- name: Run unit tests
run: npm test
env:
NODE_OPTIONS: "--max_old_space_size=4096"
# Configure Git author information
- name: Set Git author
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Bump versions
run: lerna version
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Build
run: lerna run build
- name: "NPM Identity"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
- name: Publish package
run: lerna publish from-package --no-verify-access --yes