-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add workflows for building and publishing release binaries
- Loading branch information
1 parent
df1c1a3
commit 60ac206
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build and publish release binaries for Linux | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.21" | ||
|
||
- uses: goto-bus-stop/setup-zig@v2 | ||
with: | ||
version: "0.11.0" | ||
|
||
- name: Test | ||
run: go test -v ./... | ||
|
||
- name: Build x86_64 Linux | ||
run: GOOS=linux GOARCH=amd64 CGO_ENABLED=1 CC="zig cc -target x86_64-linux-musl" go build -o timew-sync-server-x86_64-linux | ||
|
||
- name: Build aarch64 Linux | ||
run: GOOS=linux GOARCH=arm64 CGO_ENABLED=1 CC="zig cc -target aarch64-linux-musl" go build -o timew-sync-server-aarch64-linux | ||
|
||
- name: Release | ||
uses: softprops/[email protected] | ||
with: | ||
files: | | ||
timew-sync-server-x86_64-linux | ||
timew-sync-server-aarch64-linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build and publish release binaries for macOS | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.21" | ||
|
||
- name: Test | ||
run: go test -v ./... | ||
|
||
- name: Build x86_64 macOS | ||
run: GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 go build -o timew-sync-server-x86_64-macos | ||
|
||
- name: Build aarch64 macOS | ||
run: GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build -o timew-sync-server-aarch64-macos | ||
|
||
- name: Release | ||
uses: softprops/[email protected] | ||
with: | ||
files: | | ||
timew-sync-server-x86_64-macos | ||
timew-sync-server-aarch64-macos |