-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (47 loc) · 1.28 KB
/
branch.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
name: Branch
on: [push]
jobs:
build-and-analyze:
runs-on: ubuntu-latest
steps:
- name: "Checkout changes"
uses: actions/checkout@v3
- name: "Install"
run: "yarn install"
- name: "Bootstrap"
run: "yarn bootstrap"
- name: "Build"
run: "yarn build"
- name: "Test"
run: "yarn test"
- name: "Lint"
run: "yarn lint"
- name: "Prepare build artifacts"
run: "./scripts/pre_upload_artifacts.sh"
- name: "Upload build artifacts"
uses: actions/upload-artifact@v1
with:
name: dist
path: dist
publish:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: [build-and-analyze]
steps:
- name: "Checkout changes"
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: "Pull build artifacts"
uses: actions/download-artifact@v1
with:
name: dist
path: dist
- name: "Prepare build artifacts"
run: "./scripts/post_download_artifacts.sh"
- name: "Publish changes"
uses: Vertexvis/npm-publish-action@v2.3.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
npm-auth-token: ${{ secrets.NPMJS_ACCESS_TOKEN }}