Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
@@ -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 }}
47 changes: 47 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -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 }}"
Loading