Skip to content

Commit

Permalink
Add github workflow to build application.
Browse files Browse the repository at this point in the history
  • Loading branch information
seternate committed Mar 7, 2024
1 parent 94c39f0 commit 3c9a506
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
icon.png filter=lfs diff=lfs merge=lfs -text
cmd/rsrc_windows_amd64.syso filter=lfs diff=lfs merge=lfs -text
34 changes: 34 additions & 0 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Go

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: "true"
- name: Setup Golang
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Install build dependency packages
run: sudo apt-get update && sudo apt-get install -y libgl1-mesa-dev xorg-dev gcc-mingw-w64-x86-64
- name: Go Generate
run: go generate -xvn ./...
- name: Build
run: GOOS=windows CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc-win32 go build -o ./build/lanty.exe -vx -ldflags -H=windowsgui ./cmd
- name: Get settings file
run: cp ./settings.yaml ./build
- uses: actions/upload-artifact@v4
with:
name: lanty
path: ./build
if-no-files-found: error
retention-days: 1
overwrite: "true"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
!cmd/
!cmd/icon.png
!cmd/winres.json
!cmd/rsrc_*.syso
!pkg/
!pkg/controller/
!pkg/layout/
Expand Down
4 changes: 0 additions & 4 deletions build.bat

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

//go:generate go run github.com/tc-hib/[email protected] make --in ./winres.json --arch amd64
//go:generate fyne bundle -o ./bundled.go ./icon.png
//go:generate go run fyne.io/fyne/v2/cmd/[email protected] bundle -o ./bundled.go ./icon.png

func main() {
signalCtx, cancelSignalCtx := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
Expand Down
3 changes: 3 additions & 0 deletions cmd/rsrc_windows_amd64.syso
Git LFS file not shown

0 comments on commit 3c9a506

Please sign in to comment.