multi example upgrade #651
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.bc | |
!build/libar_simd.bc | |
- 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@v1 | |
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_td.worker.js | |
build/artoolkitNFT_ES6_wasm.simd.js | |
build/artoolkitNFT_thread.js | |
build/artoolkitNFT_thread.worker.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 |