Skip to content

Commit d1e0747

Browse files
committed
update workflow
1 parent ef50fe8 commit d1e0747

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

.github/workflows/cron.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,18 @@ jobs:
3232
go-version: 1.18 # The Go version to download (if necessary) and use.
3333
cache: true
3434

35+
- uses: actions/setup-node@v3
36+
with:
37+
node-version: 16
38+
3539
- name: Install dependencies
3640
run: |
3741
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
3845
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
4047
4148
- name: Run build
4249
run: |

.github/workflows/release.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
- uses: actions/setup-node@v3
1717
with:
1818
node-version: 16
19-
cache: 'npm'
2019

2120
- name: Get dependencies, run test and static check
2221
run: |

.github/workflows/test.yaml

+13-14
Original file line numberDiff line numberDiff line change
@@ -39,29 +39,28 @@ jobs:
3939
echo "::set-output name=ASSET_NAME::$_NAME"
4040
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV
4141
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-
4842
- name: Check out code into the Go module directory
49-
uses: actions/checkout@v2
43+
uses: actions/checkout@v3
5044

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
5352
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
5854

5955
# Install all the dependencies
6056
- name: Install dependencies
6157
run: |
6258
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
6362
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
6564
6665

6766
# Run build of the application

0 commit comments

Comments
 (0)