From 4a014a9bc04bac7f244decb01c77b70a20243112 Mon Sep 17 00:00:00 2001 From: Michael McQuade Date: Sun, 12 Jul 2026 15:24:02 -0500 Subject: [PATCH] Build and publish release binaries from CI Pushing a v* tag builds static linux amd64 and arm64 binaries and creates the GitHub release with the goofys, goofys-amd64, and goofys-arm64 assets that image builds download from releases/latest. Pull requests build the tree and run the unit tests. Claude-Session: https://claude.ai/code/session_0191kNQ9ZxzwEng9QfcfBKe6 --- .github/workflows/ci.yml | 25 ++++++++++++++++++++++++ .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..93d927cb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: ci + +on: + pull_request: + push: + branches: + - master + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: stable + + - name: Build + env: + CGO_ENABLED: '0' + run: GOOS=linux GOARCH=amd64 go build ./... + + - name: Unit tests + run: go test ./api/... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..ce17c2d0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: release + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: stable + + - name: Build linux binaries + env: + CGO_ENABLED: '0' + run: | + GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o goofys-amd64 . + GOOS=linux GOARCH=arm64 go build -ldflags "-s -w" -o goofys-arm64 . + cp goofys-amd64 goofys + + - name: Create release and upload assets + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release create "$GITHUB_REF_NAME" \ + --title "$GITHUB_REF_NAME" \ + --generate-notes \ + goofys goofys-amd64 goofys-arm64