-
-
Notifications
You must be signed in to change notification settings - Fork 20
43 lines (35 loc) · 1.06 KB
/
Go-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
name: Go Build
on:
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
arch: ["amd64", "arm64"]
go-version: ["1.22.x"]
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: go/go.sum
- name: Display Go version
run: go version
- name: Install dependencies
working-directory: ./go
run: go get .
- name: Build ${{ matrix.arch }} binary
working-directory: ./go
env:
GOARCH: ${{ matrix.arch }}
run: go build -ldflags "-H=windowsgui" -o WindSend-S-Go-${{ matrix.go-version }}-${{ matrix.arch }}.exe
- name: Test with the Go CLI
working-directory: ./go
run: go test
- name: Upload Go Binary
uses: actions/upload-artifact@v4
with:
name: WindSend-S-Go-${{ matrix.go-version }}-${{ matrix.arch }}
path: ./go/WindSend-S-Go-*.exe