-
-
Notifications
You must be signed in to change notification settings - Fork 149
43 lines (35 loc) · 1.02 KB
/
main.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: Main
on: ["push", "pull_request"]
jobs:
build:
name: Build, test and eventually publish
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9.11.0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Setup ESLint cache
uses: actions/cache@v4
with:
path: ./.eslintcache
key: ${{ runner.os }}-eslint-${{ hashFiles('**/pnpm-lock.yaml', '**/eslint.config.mjs') }}
- name: Lint
run: pnpm run lint
- name: Build
run: pnpm run build
- name: Publish
if: startsWith(github.event.ref, 'refs/tags/v')
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx lerna publish from-package --yes