-
Notifications
You must be signed in to change notification settings - Fork 4
79 lines (75 loc) · 2.25 KB
/
build.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
name: build
on:
push:
branches:
- '*'
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: mymindstorm/setup-emsdk@v11
- name: Create Build Environment
shell: bash
working-directory: ${{runner.workspace}}/sfizz-webaudio
run: cmake -E make_directory build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/sfizz-webaudio/build
run: |
emcmake cmake "$GITHUB_WORKSPACE" -DCMAKE_BUILD_TYPE=Release
- name: Build
shell: bash
working-directory: ${{runner.workspace}}/sfizz-webaudio/build
run: |
cmake --build . --config "$BUILD_TYPE" -j 2
- name: Inspect directory
working-directory: ${{runner.workspace}}/sfizz-webaudio
run: |
pwd
ls -al
ls -al build
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: sfizz-webaudio
path: |
index.html
index.js
index.css
sfizz-node.js
sfizz-processor.js
build/sfizz.wasm.js
util/WASMAudioBuffer.js
upload:
name: Create release and upload artifacts
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Inspect directory
run: ls -alFR
- name: Upload to GitHub pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: www
publish_dir: ./sfizz-webaudio
force_orphan: true
- name: Rezip artifact
uses: montudor/action-zip@v1
with:
args: zip -r sfizz-webaudio.zip sfizz-webaudio
- name: Create release and upload artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
chmod +x pyuploadtool-x86_64.AppImage
./pyuploadtool-x86_64.AppImage sfizz-webaudio.zip