-
-
Notifications
You must be signed in to change notification settings - Fork 423
85 lines (84 loc) · 2.3 KB
/
Copy pathpublish.yml
File metadata and controls
85 lines (84 loc) · 2.3 KB
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
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: 22
- 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@v4
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 "sebastien.jourdain@kitware.com"
npm run semantic-release
deploy_docs:
if: github.ref == 'refs/heads/master'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 22
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build:release
- name: Build API docs
run: npm run doc:generate-api
- name: Build docs
run: npm run doc:minified
- name: Upload docs as a Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./Documentation/build-tmp/public/
- name: Deploy docs
uses: actions/deploy-pages@v4