-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (37 loc) · 1.2 KB
/
release.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
name: Go Build and Release
on:
push:
tags:
- 'v*' # Trigger on version tags like v1.0.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Build for Linux x64
run: GOOS=linux GOARCH=amd64 go build -v -o gojada-linux-amd64
- name: Build for Linux ARMv7
run: GOOS=linux GOARCH=arm GOARM=7 go build -v -o gojada-linux-armv7
- name: Build for Linux ARM64
run: GOOS=linux GOARCH=arm64 go build -v -o gojada-linux-arm64
- name: Build for macOS x64
run: GOOS=darwin GOARCH=amd64 go build -v -o gojada-darwin-amd64
- name: Build for macOS Apple Silicon
run: GOOS=darwin GOARCH=arm64 go build -v -o gojada-darwin-arm64
- name: Build for Windows x64
run: GOOS=windows GOARCH=amd64 go build -v -o gojada-windows-amd64.exe
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
gojada-linux-amd64
gojada-linux-armv7
gojada-linux-arm64
gojada-darwin-amd64
gojada-darwin-arm64
gojada-windows-amd64.exe