Skip to content

fix(agentcontrol): stop the tmux fixtures racing their own readiness … #82

fix(agentcontrol): stop the tmux fixtures racing their own readiness …

fix(agentcontrol): stop the tmux fixtures racing their own readiness … #82

Workflow file for this run

name: Release
on:
push:
tags: ["v[0-9]*.[0-9]*.[0-9]*"]
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
- uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: "~> v2"
install-only: true
- name: Validate tag against live main
env:
RELEASE_VERSION: ${{ github.ref_name }}
run: ./scripts/check-release-state.sh tagged
- name: Tests and snapshot build
env:
GOWORK: "off"
run: |
# Align with go-ci: full-tree gofmt is not a gate (legacy debt).
# Snapshot + archive/guard tests catch release packaging regressions.
make test build release-snapshot
./scripts/verify-release-archives.sh dist
./scripts/test-release-guards.sh dist
./scripts/test-release-publication.sh
release:
needs: verify
runs-on: ubuntu-latest
permissions:
contents: write
env:
GOWORK: "off"
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
- name: Recheck tag against live main
env:
RELEASE_VERSION: ${{ github.ref_name }}
run: ./scripts/check-release-state.sh tagged
- uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-homebrew-tap:
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout sidecar (for formula template + renderer)
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Extract version
id: version
run: echo "version=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
- name: Get source tarball SHA256
id: sha
run: |
set -euo pipefail
VERSION="${{ steps.version.outputs.version }}"
ARCHIVE="sidecar-${VERSION#v}.tar.gz"
curl --fail --location --retry 3 --output "$ARCHIVE" \
"https://github.com/${{ github.repository }}/archive/refs/tags/${VERSION}.tar.gz"
SHA=$(sha256sum "$ARCHIVE" | cut -d' ' -f1)
echo "sha256=$SHA" >> "$GITHUB_OUTPUT"
- name: Render formula
run: |
set -euo pipefail
chmod +x scripts/render-homebrew-formula.sh
mkdir -p /tmp/rendered
./scripts/render-homebrew-formula.sh \
"${{ steps.version.outputs.version }}" \
"${{ steps.sha.outputs.sha256 }}" \
/tmp/rendered/sidecar.rb
cat /tmp/rendered/sidecar.rb
- name: Checkout Homebrew tap
uses: actions/checkout@v7
with:
repository: marcus/homebrew-tap
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
path: homebrew-tap
- name: Update formula with guards
env:
RELEASE_VERSION: ${{ steps.version.outputs.version }}
run: |
set -euo pipefail
# shellcheck source=scripts/publish-homebrew-tap.sh
source ./scripts/publish-homebrew-tap.sh
apply_formula_to_tap \
"$RELEASE_VERSION" \
/tmp/rendered/sidecar.rb \
"$GITHUB_WORKSPACE/homebrew-tap"