-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.27 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
name: Build
on:
pull_request:
branches:
- master
push:
branches:
- master
env:
goVersion: '1.23'
appVersion: '1.3.1'
jobs:
build:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
arch: [amd64, arm64]
name: Build ${{ matrix.os }} ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.goVersion }}
- name: Build
run: go build -ldflags "-s -w"
env:
GOARCH: ${{ matrix.arch }}
- name: Upload output
uses: actions/upload-artifact@v4
with:
name: icon-metrics-${{ matrix.os }}-${{ matrix.arch }}
path: |
icon-metrics.exe
config.yml
- name: Create deb
if: matrix.os == 'ubuntu-latest'
run: packaging/pkg-deb ${{ matrix.arch }} ${{ env.appVersion }}
- name: Upload deb
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest'
with:
name: icon-metrics-deb-${{ matrix.arch }}
path: packaging/icon-metrics-${{ matrix.arch }}-${{ env.appVersion }}.deb