forked from qbit/widdler
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.08 KB
/
build-go.yaml
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
# .github/workflows/release.yaml
on:
push:
branches: [ "action-workflow" ]
workflow_dispatch:
inputs:
branch:
required: true
default: "action-workflow"
permissions:
contents: write
packages: write
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows]
goarch: [amd64, arm64]
exclude:
- goarch: arm64
goos: windows
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23' # Set your required Go version here
- name: Build binary
run: |
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o output/widdler-${{ matrix.goos }}-${{ matrix.goarch }} main.go
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: widdler-${{ matrix.goos }}-${{ matrix.goarch }}
path: output/widdler-${{ matrix.goos }}-${{ matrix.goarch }}