generated from JupiterOne-Archives/integration-template
-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (47 loc) · 1.22 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
name: Build
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code repository source code
uses: actions/checkout@v3
- id: setup-node
name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Run tests
run: yarn test:ci
- name: Run build
run: yarn build
# Publishing is done in a separate job to allow
# for all matrix builds to complete.
BuildRelease:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
name: Checkout Code
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.AUTO_GITHUB_PAT_TOKEN }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- name: Build and Release
uses: jupiterone/action-npm-build-release@v1
with:
npm_auth_token: ${{ secrets.NPM_AUTH_TOKEN }}
gh_token: ${{ secrets.AUTO_GITHUB_PAT_TOKEN }}