-
-
Notifications
You must be signed in to change notification settings - Fork 382
61 lines (60 loc) · 1.74 KB
/
publish.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
name: Release
on:
push:
branches:
- master
- next
- next-major
- beta
- '[0-9]+.x'
- '[0-9]+.[0-9]+.x'
jobs:
publish:
name: Publish
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 20
- name: Install dependencies
run: |
npm ci
sudo apt-get install xvfb
- name: Build
run: npm run build:release
- name: Validate code style
run: npm run validate
- name: Validate generated typescript definitions
run: |
npx tsc -p tsconfig.esm-check.json
npx tsc -p tsconfig.umd-check.json
- name: Chrome and Firefox tests
run: xvfb-run --auto-servernum npm run test -- --browsers Chrome,Firefox
- name: Archive test results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results
path: Utilities/TestResults/Test-Report.html
retention-days: 15
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
git config --global user.name "Github Actions"
git config --global user.email "[email protected]"
npm run semantic-release
- name: Build API docs
if: github.ref == 'refs/heads/master'
run: npm run doc:generate-api
- name: Publish docs
if: github.ref == 'refs/heads/master'
env:
GIT_PUBLISH_URL: https://${{ secrets.GH_PUBLISH_CREDS }}@github.com/Kitware/vtk-js.git
run: npm run doc:publish