-
Notifications
You must be signed in to change notification settings - Fork 11
41 lines (33 loc) · 925 Bytes
/
deploy-wasm.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
name: Deploy WebAssembly Build
on:
push:
tags: [v*]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Dependencies
run: 'sudo apt-get update && sudo apt-get -y install advancecomp zip'
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Build
run: 'make BUILDTYPE=release BINARY=aaaaxy-js-wasm.wasm'
env:
AAAAXY_BUILD_USE_VERSION_FILE: true
GOARCH: wasm
GOOS: js
- name: Steal/acquire wasm_exec.js
run: 'cp -v "$(go env GOROOT)/misc/wasm/wasm_exec.js" .'
env:
GOARCH: wasm
GOOS: js
- name: Deploy
env:
DEPLOY_URL: ${{ secrets.DEPLOY_URL }}
run: 'tar cvzf - aaaaxy-js-wasm.wasm aaaaxy.html wasm_exec.js | base64 | curl -X POST -d @- "$DEPLOY_URL"'