Skip to content

Commit 00be407

Browse files
committed
add build frontend
1 parent b2c8235 commit 00be407

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.github/workflows/go.yml

+8
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ jobs:
2020
with:
2121
go-version: "1.23"
2222

23+
- name: Use Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: "20.x"
27+
2328
- name: Install Gox
2429
run: go install github.com/mitchellh/gox@latest
2530

@@ -29,6 +34,9 @@ jobs:
2934
- name: Install Task
3035
uses: arduino/setup-task@v2
3136

37+
- name: Build Frontend
38+
run: task build_frontend
39+
3240
- name: Test
3341
shell: pwsh
3442
run: task test

Taskfile.yaml

+7-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ env:
55

66
tasks:
77
build:
8-
deps: [ build_wails ,build_cmd ]
8+
deps: [build_wails, build_cmd]
99

1010
test:
1111
cmds:
12-
- go test -timeout 30s
12+
- go test -v -timeout 30s ./...
1313

1414
build_wails:
1515
cmds:
@@ -19,11 +19,15 @@ tasks:
1919
cmds:
2020
- pwsh ./script/build.ps1
2121

22+
build_frontend:
23+
cmds:
24+
- pwsh ./script/buildFrontend.ps1
25+
2226
wails_dev:
2327
cmds:
2428
- wails dev -tags gui
2529

2630
build_update_package:
2731
cmds:
2832
- Set-Location ./internal/app/package
29-
- go build -ldflags "-s -w" -o upgrade.exe
33+
- go build -ldflags "-s -w" -o example.exe

script/buildFrontend.ps1

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
$ErrorActionPreference = "Stop"
2+
3+
Set-Location ./frontend
4+
5+
npm ci
6+
npm build
7+
8+
Set-Location ../

0 commit comments

Comments
 (0)