-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.23 KB
/
Copy pathrelease.yml
File metadata and controls
48 lines (38 loc) · 1.23 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
name: Build and Release Goit
on:
push:
tags:
- "v*"
jobs:
release:
name: Build and Upload Assets
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.25.1"
- name: Compile Binaries for Multiple OS/Arch
run: |
echo "Building for Windows (amd64)..."
GOOS=windows GOARCH=amd64 go build -o goit-windows-amd64.exe main.go
echo "Building for Linux (amd64)..."
GOOS=linux GOARCH=amd64 go build -o goit-linux-amd64 main.go
echo "Building for macOS (Intel)..."
GOOS=darwin GOARCH=amd64 go build -o goit-darwin-amd64 main.go
echo "Building for macOS (Apple Silicon M1/M2/M3)..."
GOOS=darwin GOARCH=arm64 go build -o goit-darwin-arm64 main.go
- name: Create GitHub Release and Upload Binaries
uses: softprops/action-gh-release@v2
with:
files: |
goit-windows-amd64.exe
goit-linux-amd64
goit-darwin-amd64
goit-darwin-arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}