-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (82 loc) · 2.07 KB
/
build.yml
File metadata and controls
93 lines (82 loc) · 2.07 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Build Release Binaries
on:
workflow_dispatch:
release:
types: [released]
permissions:
contents: write
jobs:
build:
name: Build and Upload Release Assets
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
# Windows builds
- os: windows
arch: amd64
extension: .exe
- os: windows
arch: arm64
extension: .exe
# Linux builds
- os: linux
arch: amd64
extension: ""
- os: linux
arch: arm64
extension: ""
- os: linux
arch: 386
extension: ""
- os: linux
arch: arm
extension: ""
- os: linux
arch: ppc64le
extension: ""
- os: linux
arch: s390x
extension: ""
- os: linux
arch: riscv64
extension: ""
- os: linux
arch: mips64
extension: ""
# macOS builds
- os: darwin
arch: amd64
extension: ""
- os: darwin
arch: arm64
extension: ""
# FreeBSD builds
- os: freebsd
arch: amd64
extension: ""
- os: freebsd
arch: arm64
extension: ""
# OpenBSD builds
- os: openbsd
arch: amd64
extension: ""
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24'
- name: Build Binary
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
CGO_ENABLED: 0
run: |
go build -trimpath -ldflags="-s -w" -o "linktransfer-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.extension }}" cmd/lt/main.go
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
with:
files: linktransfer-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.extension }}