-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (32 loc) · 1.18 KB
/
build-and-publish-demos.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
name: Build and publish demos
on:
push:
branches:
- main
permissions:
contents: write # Required to upload artifacts to releases (and pushing the version update)
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: acifani/setup-tinygo@v2
- run: mkdir -p public
- name: Build sdf-viewer-go/example
run: |
cd $GITHUB_WORKSPACE/sdf-viewer-go/example
tinygo build -o ../../public/sdf-viewer-go.wasm -target wasi -opt 2 -x -no-debug -wasm-abi generic .
- name: Build sdf-viewer-go-sdfx/example
run: |
cd $GITHUB_WORKSPACE/sdf-viewer-go-sdfx/example
tinygo build -o ../../public/sdf-viewer-go-sdfx.wasm -target wasi -opt 2 -x -no-debug -wasm-abi generic .
- name: Build sdf-viewer-go-sdf/example
run: |
cd $GITHUB_WORKSPACE/sdf-viewer-go-sdf/example
tinygo build -o ../../public/sdf-viewer-go-sdf.wasm -target wasi -opt 2 -x -no-debug -wasm-abi generic .
- name: Publish
uses: JamesIves/github-pages-deploy-action@v4.4.0
with:
branch: gh-pages
folder: public