-
Notifications
You must be signed in to change notification settings - Fork 8
38 lines (33 loc) · 977 Bytes
/
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
name: build
on:
pull_request:
push:
branches: [master]
tags:
- .*
jobs:
build_test_and_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Install nodejs 🔧
uses: actions/setup-node@v3
with:
node-version: latest
- name: Build and test app 🔧
run: |
npm ci
npm run build:ci
- name: Copy relevant documentation into the build folder
run: cp package.json README.md LICENSE-APACHE LICENSE-MIT ./dist
- name: Publish to npmjs
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
# dry run if on a side branch
dry-run: ${{ github.ref != 'refs/heads/master' }}
# don't try and deploy if versions haven't changed
check-version: true
package: dist/package.json
if: github.event_name != 'pull_request'