Skip to content

Commit

Permalink
add build frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
leijux committed Nov 25, 2024
1 parent b2c8235 commit 00be407
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
with:
go-version: "1.23"

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Install Gox
run: go install github.com/mitchellh/gox@latest

Expand All @@ -29,6 +34,9 @@ jobs:
- name: Install Task
uses: arduino/setup-task@v2

- name: Build Frontend
run: task build_frontend

- name: Test
shell: pwsh
run: task test
Expand Down
10 changes: 7 additions & 3 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ env:

tasks:
build:
deps: [ build_wails ,build_cmd ]
deps: [build_wails, build_cmd]

test:
cmds:
- go test -timeout 30s
- go test -v -timeout 30s ./...

build_wails:
cmds:
Expand All @@ -19,11 +19,15 @@ tasks:
cmds:
- pwsh ./script/build.ps1

build_frontend:
cmds:
- pwsh ./script/buildFrontend.ps1

wails_dev:
cmds:
- wails dev -tags gui

build_update_package:
cmds:
- Set-Location ./internal/app/package
- go build -ldflags "-s -w" -o upgrade.exe
- go build -ldflags "-s -w" -o example.exe
8 changes: 8 additions & 0 deletions script/buildFrontend.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$ErrorActionPreference = "Stop"

Set-Location ./frontend

npm ci
npm build

Set-Location ../

0 comments on commit 00be407

Please sign in to comment.