-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github workflow to build application.
- Loading branch information
Showing
6 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
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: Check if Go Generate produce diff | ||
run: | | ||
go generate ./... | ||
if [ $(git status --porcelain | wc -l) -eq "0" ]; then | ||
echo " 🟢 All files up-to-date." | ||
else | ||
echo "🔴 'go generate' was not run before commiting." | ||
exit 1 | ||
fi | ||
- name: Setup build environment | ||
run: sudo apt-get update && sudo apt-get install -y libgl1-mesa-dev xorg-dev gcc-mingw-w64-x86-64 | ||
- name: Build | ||
run: GOOS=windows CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc-win32 go build -o ./build/lanty.exe -v -x -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
!cmd/ | ||
!cmd/icon.png | ||
!cmd/winres.json | ||
!cmd/rsrc_*.syso | ||
!pkg/ | ||
!pkg/controller/ | ||
!pkg/layout/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
|
Git LFS file not shown