Skip to content

Commit 4b87d4c

Browse files
build: add missing build file
1 parent f1b51fe commit 4b87d4c

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/build-common.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# .github/workflows/build-common.yml
2+
name: Common Build Tasks
3+
4+
on:
5+
workflow_call:
6+
outputs:
7+
artifact-name:
8+
description: "x2i binaries"
9+
value: x2i-binaries
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v5
19+
with:
20+
go-version: 1.22.4
21+
22+
- name: Build
23+
run: |
24+
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o x2i-linux-amd64 x2i.go
25+
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o x2i-linux-arm64 x2i.go
26+
GOOS=windows GOARCH=386 go build -o x2i-windows-386.exe x2i.go
27+
GOOS=windows GOARCH=amd64 go build -o x2i-windows-amd64.exe x2i.go
28+
GOOS=darwin GOARCH=amd64 go build -o x2i-macos-amd64 x2i.go
29+
GOOS=darwin GOARCH=arm64 go build -o x2i-macos-arm64 x2i.go
30+
31+
- name: Upload build artifacts
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: x2i-binaries
35+
path: x2i-*

0 commit comments

Comments
 (0)