File tree 3 files changed +21
-16
lines changed
3 files changed +21
-16
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,18 @@ jobs:
32
32
go-version : 1.18 # The Go version to download (if necessary) and use.
33
33
cache : true
34
34
35
+ - uses : actions/setup-node@v3
36
+ with :
37
+ node-version : 16
38
+
35
39
- name : Install dependencies
36
40
run : |
37
41
go version
42
+ cp $(go env GOROOT)/misc/wasm/wasm_exec.js ./web/gui/wasm_exec.js
43
+ npm install --prefix web/gui build
44
+ NODE_ENV=production npm run --prefix web/gui build
38
45
GOOS=js GOARCH=wasm go get -u ./...
39
- GOOS=js GOARCH=wasm go build -o ./web/main.wasm ./wasm
46
+ GOOS=js GOARCH=wasm go build -o ./web/gui/dist/ main.wasm ./wasm
40
47
41
48
- name : Run build
42
49
run : |
Original file line number Diff line number Diff line change 16
16
- uses : actions/setup-node@v3
17
17
with :
18
18
node-version : 16
19
- cache : ' npm'
20
19
21
20
- name : Get dependencies, run test and static check
22
21
run : |
Original file line number Diff line number Diff line change @@ -39,29 +39,28 @@ jobs:
39
39
echo "::set-output name=ASSET_NAME::$_NAME"
40
40
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV
41
41
42
- # Setup Go
43
- - name : Setup Go
44
- uses : actions/setup-go@v2
45
- with :
46
- go-version : ^1.18.1 # The Go version to download (if necessary) and use.
47
-
48
42
- name : Check out code into the Go module directory
49
- uses : actions/checkout@v2
43
+ uses : actions/checkout@v3
50
44
51
- - name : Cache go module
52
- uses : actions/cache@v2
45
+ - name : Setup Go
46
+ uses : actions/setup-go@v3
47
+ with :
48
+ go-version : 1.19
49
+ cache : true
50
+
51
+ - uses : actions/setup-node@v3
53
52
with :
54
- path : ~/go/pkg/mod
55
- key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
56
- restore-keys : |
57
- ${{ runner.os }}-go-
53
+ node-version : 16
58
54
59
55
# Install all the dependencies
60
56
- name : Install dependencies
61
57
run : |
62
58
go version
59
+ cp $(go env GOROOT)/misc/wasm/wasm_exec.js ./web/gui/wasm_exec.js
60
+ npm install --prefix web/gui build
61
+ NODE_ENV=production npm run --prefix web/gui build
63
62
GOOS=js GOARCH=wasm go get -u ./...
64
- GOOS=js GOARCH=wasm go build -o ./web/main.wasm ./wasm
63
+ GOOS=js GOARCH=wasm go build -o ./web/gui/dist/ main.wasm ./wasm
65
64
66
65
67
66
# Run build of the application
You can’t perform that action at this time.
0 commit comments