-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (54 loc) · 1.56 KB
/
ci.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: build
on:
push:
branches: [ main ]
tags: [ v* ]
pull_request:
branches: [ main ]
jobs:
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Event File
path: ${{ github.event_path }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '20.x'
registry-url: https://registry.npmjs.org/
- name: install
run: npm ci
- name: build package
run: npm run build
# - name: Setup Chrome
# uses: browser-actions/setup-chrome@v1
- name: test package
run: npm test
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v3
with:
name: Test Results
path: |
package/tests/.artifacts/results.xml
# - name: Publish Test Results
# uses: EnricoMi/publish-unit-test-result-action/composite@v2
# if: always()
# with:
# files: |
# package/tests/.artifacts/results.xml
# publish to npm
- name: publish to npm
run: npm publish --access public --@sparser:registry=https://registry.npmjs.org/
working-directory: ./package
if: startsWith(github.ref, 'refs/tags/v')
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# TODO: Changelog generation, version tagging