-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (72 loc) · 2.08 KB
/
build.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
66
67
68
69
70
71
72
73
74
75
76
77
name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Build
# Set the type of machine to run on
runs-on: ubuntu-latest
timeout-minutes: 15
if: github.ref != 'refs/heads/master'
strategy:
matrix:
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
always-auth: true
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
scope: '@pristine'
- run: npm install -g [email protected]
- run: npm -v
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run bootstrap
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run build
- run: npx eslint --ext .ts packages/**
- run: npm run test
- run: npm run e2e
- run: npm run perf
publish:
name: Publish
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
# Set the type of machine to run on
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- name: Use Node.js 18.x
uses: actions/setup-node@v2
with:
always-auth: true
node-version: 18.x
registry-url: https://registry.npmjs.org
scope: '@pristine'
- run: npm install -g npm@latest
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run bootstrap
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: git config --global user.name 'ima-bot'
- run: git config --global user.email '[email protected]'
- run: npm run bump-patch
- run: npm whoami
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run publish-ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}