-
-
Notifications
You must be signed in to change notification settings - Fork 25
86 lines (82 loc) · 2.63 KB
/
main.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Build jsartoolkitNFT CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set output
id: vars
run: echo name=tag::${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
- name: Check output
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: |
echo $RELEASE_VERSION
echo ${{ steps.vars.outputs.tag }}
- uses: actions/upload-artifact@v4
with:
name: build
path: |
build
!build/libar.o
!build/libar_td.o
!build/libar_simd.o
- run: git submodule update --init
- run: npm install
- run: docker run -dit --name emscripten -v $(pwd):/src emscripten/emsdk:3.1.69 bash
- run: docker exec emscripten npm run build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist
- run: npm run build-ts
- name: Commit changes
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: new build files from action
add: '["build", "dist"]'
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
build/artoolkitNFT_embed_ES6_wasm.js
build/artoolkitNFT_ES6_wasm.js
build/artoolkitNFT_ES6_wasm_td.js
build/artoolkitNFT_ES6_wasm.simd.js
build/artoolkitNFT_thread.js
build/artoolkitNFT_wasm.js
build/artoolkitNFT_wasm.simd.js
build/artoolkitNFT.debug.js
build/artoolkitNFT.min.js
js/artoolkitNFT_ES6_custom.worker.js
js/artoolkitNFT_ES6_gray.worker.js
js/artoolkitNFT_ES6.worker.js
js/artoolkitNFT_multi_ES6.worker.js
js/artoolkitNFT.api.js
js/artoolkitNFT_ES6.api.js
js/artoolkitNFT.worker.js
js/artoolkitNFT.embed_ES6_worker.js
js/artoolkitNFT.multi_worker.js
dist/ARToolkitNFT.js
dist/ARToolkitNFT_simd.js
dist/ARToolkitNFT_td.js