From 7cbf44d5f8eb41963ff8a80b6d68f176679a6b59 Mon Sep 17 00:00:00 2001 From: zeidlitz Date: Wed, 26 Nov 2025 21:07:13 +0100 Subject: [PATCH 1/3] feat: expand gh actions --- .github/workflows/release.yaml | 41 ++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d0ae241..46c5cba 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,16 +7,49 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + goarch: [amd64, arm64] steps: - name: Checkout uses: actions/checkout@v5 - - name: Build - run: go build -o observer . + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.24' + + - name: Build binary + run: | + echo "Building for ${{ matrix.goarch }}" + GOOS=linux GOARCH=${{ matrix.goarch }} go build -o observer-${{ matrix.goarch }} . + + - name: Package binary as tar.gz with release tag + run: | + TAG=${GITHUB_REF#refs/tags/} + tar -czf observer-${{ matrix.goarch }}-$TAG.tar.gz observer-${{ matrix.goarch }} - - name: Release + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: observer-${{ matrix.goarch }}-${GITHUB_REF#refs/tags/}.tar.gz + path: observer-${{ matrix.goarch }}-${GITHUB_REF#refs/tags/}.tar.gz + + release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + path: . + + - name: Create GitHub Release uses: softprops/action-gh-release@v2 if: github.ref_type == 'tag' with: - files: observer + files: | + observer-amd64-${GITHUB_REF#refs/tags/}.tar.gz + observer-arm64-${GITHUB_REF#refs/tags/}.tar.gz + From 220d554f1fa2719d9ef1fe3cf165d88d2d5fea38 Mon Sep 17 00:00:00 2001 From: zeidlitz Date: Wed, 26 Nov 2025 21:10:33 +0100 Subject: [PATCH 2/3] feat: expand gh actions --- .github/workflows/build.yaml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index eab3f29..0857733 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,28 +1,26 @@ -name: Go Build +name: Build on: push: branches: [ "master" ] - pull_request: - branches: [ "master" ] jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + goarch: [amd64, arm64] steps: - - name: Checkout code + - name: Checkout uses: actions/checkout@v5 - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: "1.24" - - - name: Run golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: actions/setup-go@v4 with: - version: latest + go-version: '1.24' - - name: Build - run: go build . + - name: Build binary + run: | + echo "Building for ${{ matrix.goarch }}" + GOOS=linux GOARCH=${{ matrix.goarch }} go build -o observer-${{ matrix.goarch }} . From 1c3d7f4fc0b3b77f269efe0115c555d937b9be28 Mon Sep 17 00:00:00 2001 From: zeidlitz Date: Wed, 26 Nov 2025 21:17:57 +0100 Subject: [PATCH 3/3] add missing step --- .github/workflows/build.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0857733..5bf1c2b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,6 +20,9 @@ jobs: with: go-version: '1.24' + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v6 + - name: Build binary run: | echo "Building for ${{ matrix.goarch }}"