CI: Add workflows for building and publishing release binaries #1
Workflow file for this run
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
name: Build and publish release binaries for Linux | |
on: | |
push: | |
# tags: | |
# - "v*.*.*" | |
jobs: | |
build: | |
runs-on: linux | |
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 |