-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (48 loc) · 1.29 KB
/
build_and_test.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
name: Node.js CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: 20.x
cache: "npm"
registry-url: https://registry.npmjs.org
- uses: justgook/setup-elm@1.2.0
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- uses: arduino/setup-protoc@v1.1.2
with:
version: 3.19.0
- name: install
run: npm ci
- name: build
run: |
mkdir generated
npm ci
npm run build
- name: test
run: |
./generate_test_protos.sh
npm test
- name: npm publish
if: ${{ github.event_name == 'push' }}
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm publish --access public || true
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: generated
path: generated/Proto