-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (73 loc) · 1.78 KB
/
s3-view.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Pull Request Checks
on:
workflow_dispatch:
push:
branches:
- main
tags:
- "v*.*.*"
pull_request:
branches:
- main
release:
types: [published]
jobs:
prettier:
runs-on: ubuntu-latest
name: Check for Linting Errors
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
- name: NPM Install
run: npm install --only-dev
shell: bash
- name: Check for Prettier Issues
run: npm run prettier
build:
runs-on: ubuntu-latest
name: Check Building
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
- name: NPM Install
run: npm install
shell: bash
- name: Build
run: npm run build
shell: bash
publish:
needs: [prettier, build]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
name: NPM Publish
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: NPM Install
run: npm install
shell: bash
- name: Build
run: npm run build
- name: Setup NPM CI
run: npm ci
- name: Publish Package
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}