-
Notifications
You must be signed in to change notification settings - Fork 8
71 lines (59 loc) · 1.79 KB
/
ci.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
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
66
67
68
69
70
71
name: CI
# Runs when a pull request is created or its head is updated
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
on: pull_request
jobs:
build:
name: 'Build and Test'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.17.1]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- name: Setup node ${{ matrix.node-version }}
# https://github.com/actions/setup-node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Setup pnpm
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Unit Tests
run: pnpm run test
next:
name: 'Publish @next'
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
node-version: [18.17.1]
#if: github.event.pull_request.draft == false
if: false
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- name: Setup node ${{ matrix.node-version }}
# https://github.com/actions/setup-node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Setup pnpm
run: pnpm install --frozen-lockfile
- name: Setup NPM config
run: pnpm config set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: git config
run: git config user.name $GIT_USER
env:
GIT_USER: ${{ secrets.GIT_USER }}
- run: git config user.email $GIT_EMAIL
env:
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
- name: Do pre-release
run: pnpm prerelease