File tree Expand file tree Collapse file tree 9 files changed +342
-75
lines changed
Expand file tree Collapse file tree 9 files changed +342
-75
lines changed Original file line number Diff line number Diff line change 1+ name : ' Setup Node Environment'
2+ description : ' Setup Node, cache and clean install'
3+
4+ inputs :
5+ registry-url :
6+ description : ' the url for the registry (github or npm)'
7+ required : false
8+ default : ' https://registry.npmjs.org'
9+
10+ runs :
11+ using : composite
12+ steps :
13+ - name : Set up Node.js
14+ uses : actions/setup-node@v3
15+ with :
16+ node-version : ' 20'
17+ registry-url : ${{ inputs.registry-url }}
18+
19+ - name : Cache Node Modules
20+ id : cache-node-modules
21+ uses : actions/cache@v4
22+ with :
23+ path : |
24+ node_modules
25+ key : modules-${{ hashFiles('package-lock.json') }}
26+
27+ - name : Cache Playwright Binaries
28+ id : cache-playwright
29+ uses : actions/cache@v4
30+ with :
31+ path : |
32+ ~/.cache/ms-playwright
33+ key : playwright-${{ hashFiles('package-lock.json') }}
34+
35+ - name : Install dependencies
36+ if : steps.cache-node-modules.outputs.cache-hit != 'true'
37+ run : npm ci
38+ shell : bash
39+
40+ - name : Install playwright browsers
41+ if : steps.cache-playwright.outputs.cache-hit != 'true'
42+ run : npx playwright install --with-deps
43+ shell : bash
44+
45+ - name : Install system dependencies for WebKit
46+ # Some WebKit dependencies seem to lay outside the cache and will need to be installed separately
47+ if : steps.cache-playwright.outputs.cache-hit == 'true'
48+ run : npx playwright install-deps webkit
49+ shell : bash
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ jobs :
10+ release-please :
11+ runs-on : ubuntu-latest
12+ outputs :
13+ release_created : ${{ steps.release.outputs.release_created }}
14+ permissions :
15+ contents : write
16+ pull-requests : write
17+ issues : write
18+ steps :
19+ - uses : googleapis/release-please-action@v4
20+ id : release
21+ with :
22+ token : ${{ secrets.GITHUB_TOKEN }}
23+ config-file : release-please-config.json
24+ manifest-file : .release-please-manifest.json
25+
26+ npm-publish :
27+ needs : release-please
28+ if : ${{ needs.release-please.outputs.release_created }}
29+ runs-on : ubuntu-latest
30+ permissions :
31+ contents : read
32+ id-token : write
33+ steps :
34+ - uses : actions/checkout@v4
35+ - name : Setup Node.js
36+ uses : actions/setup-node@v4
37+ with :
38+ node-version : ' 22'
39+ registry-url : ' https://registry.npmjs.org'
40+ cache : ' npm'
41+ - name : Install dependencies
42+ run : npm ci
43+ - name : Build the package
44+ run : npm run build
45+ - name : Publish to NPMJS.org
46+ run : npm publish --provenance --access public
47+ env :
48+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
49+
50+ gh-pages :
51+ needs : release-please
52+ if : ${{ needs.release-please.outputs.release_created }}
53+ runs-on : ubuntu-latest
54+ permissions :
55+ contents : write
56+ pages : write
57+ id-token : write
58+
59+ environment :
60+ name : github-pages
61+ url : ${{ steps.deployment.outputs.page_url }}
62+ steps :
63+ - uses : actions/checkout@v4
64+
65+ - name : Setup Node Environment
66+ run : npm ci
67+
68+ - name : Generate Documentation
69+ run : npm run doc
70+
71+ - name : Upload documentation artifact
72+ uses : actions/upload-pages-artifact@v3
73+ with :
74+ path : ./doc
75+
76+ - name : Deploy to GitHub Pages
77+ id : deployment
78+ uses : actions/deploy-pages@v4
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- name : Test branch
2- on : push
1+ name : Test
2+ on : [push, pull_request, workflow_dispatch]
3+
4+ permissions :
5+ contents : read
36
47jobs :
58 test :
811 - name : Checkout
912 uses : actions/checkout@v4
1013
11- - name : Set up Node.js
12- uses : actions/setup-node@v4
13- with :
14- node-version : " lts/*"
15-
16- - name : Install dependencies
17- run : npm ci
18-
19- - name : Install optional dependencies
20- run : npm install @rollup/rollup-linux-x64-gnu
14+ - uses : ./.github/actions/setup-node-env
2115
22- - name : Run tests
16+ - name : Build
17+ run : npm run-script build
18+ - name : Run unit tests
2319 run : npm run-script test
Original file line number Diff line number Diff line change 1+ { "." : " 1.4.0" }
You can’t perform that action at this time.
0 commit comments