name: Build heartbeat on: push: branches: [main] paths: - '**/*.go' - 'go.mod' - 'go.sum' - '.gitea/workflows/build.yml' workflow_dispatch: jobs: build: runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Go uses: actions/setup-go@v5 with: go-version: '1.22' cache: true - name: Build binary run: | CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o heartbeat ./cmd/heartbeat - name: Upload artifact uses: actions/upload-artifact@v4 with: name: heartbeat-linux-amd64 path: heartbeat retention-days: 365