generated from schreifuchs/wails-template
53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
windows:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@v4
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.24
|
|
- name: install apt dependencies
|
|
run: apt-get update && apt-get install -y mingw-w64 nsis nodejs libgtk-3-dev libwebkit2gtk-4.1-dev
|
|
- name: install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10
|
|
- name: install wails
|
|
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
|
|
- name: build
|
|
run: env GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_CXXFLAGS="-IC:\msys64\mingw64\include" wails build -ldflags '-extldflags "-static"' -skipbindings -nsis
|
|
- name: Archive bins
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: windows-bins
|
|
path: build/bin
|
|
linux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@v4
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.24
|
|
- name: install apt dependencies
|
|
run: apt-get update && apt-get install -y nodejs libgtk-3-dev libwebkit2gtk-4.1-dev
|
|
- name: install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10
|
|
- name: install wails
|
|
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
|
|
- name: build
|
|
run: wails build -tags webkit2_41
|
|
- name: Archive bins
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: linux-bins
|
|
path: build/bin
|