-
Notifications
You must be signed in to change notification settings - Fork 462
62 lines (53 loc) · 1.64 KB
/
build-npm.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
name: Create a release
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }}
concurrency:
group: npm-${{ github.ref }}
cancel-in-progress: true
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
cache: 'yarn'
cache-dependency-path: 'package/yarn.lock'
- name: Install root node dependencies
run: yarn
- name: Install package dependencies
working-directory: package
run: yarn
- name: Download Skia Binary Artifacts
uses: dawidd6/action-download-artifact@v2
with:
workflow: "build-skia.yml"
path: artifacts
branch: main
- name: Copy Artifacts to libs folder
run: yarn workflow-copy-libs
- name: Copy Skia Headers
run: yarn copy-skia-headers
- name: Build NPM Package
working-directory: package
run: |
yarn build
npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install & Build Docs
run: cd package; yarn; cd ../docs; yarn; yarn build;
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com