-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.81 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Build
on:
push:
branches:
- 'master'
tags:
- '*'
env:
APP_NAME: godnstray
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/linux-amd64/${{ env.APP_NAME }}
- name: Build for Windows
run: |
go-winres simply --icon icon/icon.png
go build -ldflags "-H=windowsgui" -o dist/windows-amd64/${{ env.APP_NAME }}.exe
GOARCH=arm go build -ldflags "-H=windowsgui" -o dist/windows-arm/${{ env.APP_NAME }}.exe
GOARCH=arm64 go build -ldflags "-H=windowsgui" -o dist/windows-arm64/${{ env.APP_NAME }}.exe
env:
GOOS: windows
GOARCH: amd64
- name: Upload Linux Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}-linux-amd64
path: ./dist/linux-amd64/${{ env.APP_NAME }}
- name: Upload Windows Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}-windows-amd64
path: ./dist/windows-amd64/${{ env.APP_NAME }}.exe
- name: Upload Windows arm Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}-windows-arm
path: ./dist/windows-arm/${{ env.APP_NAME }}.exe
- name: Upload Windows arm64 Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}-windows-arm64
path: ./dist/windows-arm64/${{ env.APP_NAME }}.exe