-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (36 loc) · 1.24 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
40
41
42
43
name: Build and publish demos
on:
push:
branches:
- main
pull_request: {}
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
with:
tinygo-version: '0.32.0'
- 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 .
- 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 .
- 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 .
- name: Publish
uses: JamesIves/github-pages-deploy-action@v4.4.0
if: github.ref == 'refs/heads/main'
with:
branch: gh-pages
folder: public