-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.14 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build
on:
push:
tags:
- '*'
env:
APP_NAME: godnstray
permissions:
contents: write
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Install
run: |
sudo apt-get install -y gcc libgtk-3-dev libayatana-appindicator3-dev
go mod tidy
go install github.com/tc-hib/go-winres@latest
- name: Build for Linux
run: go build -o dist/${{ env.APP_NAME }}-linux-amd64
- name: Build for Windows
run: |
go-winres simply --icon icon/icon.png
go build -ldflags "-H=windowsgui" -o dist/${{ env.APP_NAME }}.exe
GOARCH=arm go build -ldflags "-H=windowsgui" -o dist/${{ env.APP_NAME }}-arm.exe
GOARCH=arm64 go build -ldflags "-H=windowsgui" -o dist/${{ env.APP_NAME }}-arm64.exe
env:
GOOS: windows
GOARCH: amd64
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./dist/*