From da2e25ba678db2047bb0ebefe404b42c60d73c54 Mon Sep 17 00:00:00 2001 From: Aaron Bennett <10927621+abennett@users.noreply.github.com> Date: Sun, 8 Feb 2026 19:22:17 -0500 Subject: [PATCH] build release workflow --- .github/workflows/release.yml | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5a01c31 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,51 @@ +name: Release + +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - goos: linux + goarch: amd64 + suffix: "" + - goos: linux + goarch: arm64 + suffix: "" + - goos: windows + goarch: amd64 + suffix: ".exe" + - goos: windows + goarch: arm64 + suffix: ".exe" + - goos: darwin + goarch: amd64 + suffix: "" + - goos: darwin + goarch: arm64 + suffix: "" + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-go@v6 + with: + go-version: stable + + - name: Build + env: + GOOS: ${{ matrix.goos }} + GOARCH: ${{ matrix.goarch }} + CGO_ENABLED: "0" + run: go build -trimpath -ldflags="-s -w" -o ruok-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.suffix }} . + + - name: Upload binary to release + env: + GH_TOKEN: ${{ github.token }} + run: gh release upload "${{ github.event.release.tag_name }}" ruok-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.suffix }}