From bbc4b56d057c9f009068ba171c76709ae96b4f76 Mon Sep 17 00:00:00 2001 From: Antoine Toussaint Date: Sat, 8 Aug 2026 18:24:19 -0400 Subject: [PATCH] build: publish Python agent release assets --- .github/workflows/releaser.yml | 37 ++++++++++++++++++++++++++ .goreleaser.yaml | 47 ++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 .github/workflows/releaser.yml create mode 100644 .goreleaser.yaml diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml new file mode 100644 index 0000000..ed1a693 --- /dev/null +++ b/.github/workflows/releaser.yml @@ -0,0 +1,37 @@ +name: GoReleaser + +on: + push: + tags: + - 'v*' + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + - run: go test -v ./... + + release: + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + # ARCHITECTURE: this maintained cross toolchain supplies the Linux and + # macOS compilers required by Core's tree-sitter-backed project + # inspection while preserving the GoReleaser artifact contract. + - name: Run CGO-capable GoReleaser + run: >- + docker run --rm + -e GITHUB_TOKEN + -v "$GITHUB_WORKSPACE:/workspace" + -w /workspace + ghcr.io/goreleaser/goreleaser-cross:v1.26.4 + release --clean + env: + GITHUB_TOKEN: ${{ secrets.GH_PAT }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..fa8413e --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,47 @@ +version: 2 + +project_name: service-python + +builds: + # ARCHITECTURE: Core's authoritative source inspection uses real + # tree-sitter grammars. Agent releases therefore require CGO and the + # platform compilers supplied by goreleaser/goreleaser-cross; disabling + # CGO would silently make the production parser impossible to ship. + - id: darwin-amd64 + binary: service-python + env: + - CGO_ENABLED=1 + - CC=o64-clang + - CXX=o64-clang++ + goos: + - darwin + goarch: + - amd64 + - id: darwin-arm64 + binary: service-python + env: + - CGO_ENABLED=1 + - CC=oa64-clang + - CXX=oa64-clang++ + goos: + - darwin + goarch: + - arm64 + - id: linux-amd64 + binary: service-python + env: + - CGO_ENABLED=1 + - CC=x86_64-linux-gnu-gcc + - CXX=x86_64-linux-gnu-g++ + goos: + - linux + goarch: + - amd64 + +archives: + - id: default + formats: + - tar.gz + # Must match Core's downloader: service-{name}_{version}_{os}_{arch}.tar.gz + # (agents/manager/downloader_url.go); the binary inside is service-{name}. + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"