Skip to content

Release

Release #14

Workflow file for this run

name: Release
on:
release:
types: [ "created", "edited" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goarch: [amd64, arm64]
steps:
- name: Checkout
uses: actions/checkout@v5
- 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 artifacts
run: |
TAG=${{ github.ref_name }}
tar -czf observer-${{ matrix.goarch }}-$TAG.tar.gz observer-${{ matrix.goarch }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: observer-${{ matrix.goarch }}
path: observer-${{ matrix.goarch }}-${{ github.ref_name }}.tar.gz
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Release
uses: softprops/action-gh-release@v2
with:
name: observer-${{ github.ref_name }}
files: ./artifacts/**/*.tar.gz