* Retire legacy Homebrew tap publishing Stop the release workflow from publishing the independent bd tap formula, and document Homebrew core beads as the supported Homebrew package with migration commands for legacy tap users. Agent-Signature: codex-gpt-5.5-medium on behalf of matt wilkie * Sync beads-mcp uv.lock with pyproject version CI Package Gate (MCP) fails on `uv sync --all-groups --locked` because integrations/beads-mcp/uv.lock still pins the editable package at 1.0.5 while pyproject.toml declares 1.1.0-rc.1. This drift exists on upstream/main itself, not from this branch (PR #4478 only retires the legacy Homebrew tap and touches no MCP package files), so the branch is already on top of the latest upstream/main and a rebase cannot resolve it. Regenerate the lockfile with `uv lock`. The only change is the package's own version (1.0.5 -> 1.1.0rc1); no dependency versions change. Agent-Signature: claude-opus-4-8-high on behalf of matt wilkie Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
401 lines
15 KiB
YAML
401 lines
15 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
# Manual dispatch is only for rerunning a release from a v* tag. Publishing
|
|
# jobs below are tag-gated and skip branch refs.
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: release-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: write
|
|
id-token: write
|
|
attestations: write
|
|
|
|
jobs:
|
|
# Pre-publish gate: refuse to publish a release whose version constants and
|
|
# Docusaurus docs snapshot disagree. This blocks the failure mode where a tag
|
|
# ships with version.go bumped but the docs snapshot missing (which otherwise
|
|
# only surfaces as a red main after the artifacts are already published).
|
|
verify-version-consistency:
|
|
if: ${{ github.repository == 'gastownhall/beads' && startsWith(github.ref, 'refs/tags/v') }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Verify tag matches version.go
|
|
run: |
|
|
tag_version="${GITHUB_REF_NAME#v}"
|
|
code_version="$(grep 'Version = ' cmd/bd/version.go | sed 's/.*"\(.*\)".*/\1/')"
|
|
if [ "$tag_version" != "$code_version" ]; then
|
|
echo "ERROR: tag v$tag_version does not match cmd/bd/version.go ($code_version)" >&2
|
|
exit 1
|
|
fi
|
|
echo "OK: tag and version.go agree on $code_version"
|
|
|
|
- name: Check version + docs consistency
|
|
run: |
|
|
tag_version="${GITHUB_REF_NAME#v}"
|
|
if [[ "$tag_version" == *-* ]]; then
|
|
echo "Prerelease tag detected; stable docs snapshot may remain on latest stable release."
|
|
./scripts/check-versions.sh
|
|
else
|
|
BEADS_REQUIRE_RELEASE_DOCS=1 ./scripts/check-versions.sh
|
|
fi
|
|
|
|
release-package-mcp:
|
|
name: Release Package Gate (MCP)
|
|
if: ${{ github.repository == 'gastownhall/beads' && startsWith(github.ref, 'refs/tags/v') }}
|
|
needs: verify-version-consistency
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
|
|
with:
|
|
python-version: '3.14'
|
|
|
|
- name: Install uv
|
|
run: python -m pip install uv==0.11.16
|
|
|
|
- name: Run MCP package gate
|
|
run: make ci-package-mcp
|
|
|
|
- name: Upload validated MCP dist
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
with:
|
|
name: release-mcp-dist
|
|
path: integrations/beads-mcp/dist/*
|
|
if-no-files-found: error
|
|
retention-days: 7
|
|
|
|
release-package-npm:
|
|
name: Release Package Gate (npm)
|
|
if: ${{ github.repository == 'gastownhall/beads' && startsWith(github.ref, 'refs/tags/v') }}
|
|
needs: verify-version-consistency
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
|
with:
|
|
node-version: '24'
|
|
|
|
- name: Run npm package gate
|
|
run: make ci-package-npm
|
|
|
|
release-package-website:
|
|
name: Release Package Gate (website)
|
|
if: ${{ github.repository == 'gastownhall/beads' && startsWith(github.ref, 'refs/tags/v') }}
|
|
needs: verify-version-consistency
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
|
with:
|
|
node-version: '24'
|
|
cache: 'npm'
|
|
cache-dependency-path: website/package-lock.json
|
|
|
|
- name: Run website package gate
|
|
run: make ci-website
|
|
|
|
goreleaser:
|
|
# Guard: only run goreleaser in the canonical repository (not in forks)
|
|
if: ${{ github.repository == 'gastownhall/beads' && startsWith(github.ref, 'refs/tags/v') }}
|
|
needs:
|
|
- release-package-mcp
|
|
- release-package-npm
|
|
- release-package-website
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Install cross-compilation toolchains and signing tools
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcc-mingw-w64-x86-64 gcc-aarch64-linux-gnu osslsigncode
|
|
|
|
- name: Install go-winres for Windows PE resource embedding
|
|
run: go install github.com/tc-hib/go-winres@latest
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7
|
|
with:
|
|
distribution: goreleaser
|
|
version: '~> v2'
|
|
args: >
|
|
release --clean --parallelism 1
|
|
${{ github.repository != 'gastownhall/beads' && '--skip=publish --skip=announce' || '' }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# Windows code signing (optional - signing is skipped if not set)
|
|
WINDOWS_SIGNING_CERT_PFX_BASE64: ${{ secrets.WINDOWS_SIGNING_CERT_PFX_BASE64 }}
|
|
WINDOWS_SIGNING_CERT_PASSWORD: ${{ secrets.WINDOWS_SIGNING_CERT_PASSWORD }}
|
|
|
|
- name: Verify no ICU runtime dependency on Linux binaries
|
|
run: |
|
|
for bin in dist/bd-linux-*/bd; do
|
|
[ -f "$bin" ] || continue
|
|
if ldd "$bin" 2>/dev/null | grep -qi icu; then
|
|
echo "ERROR: $bin has unexpected ICU runtime dependency" >&2
|
|
ldd "$bin" >&2
|
|
exit 1
|
|
fi
|
|
echo "OK: $bin has no ICU runtime dependency"
|
|
done
|
|
|
|
goreleaser-macos:
|
|
# Build macOS binaries with CGO_ENABLED=1 for embedded Dolt support.
|
|
# Runs on native macOS to avoid zig/osxcross cross-compilation issues.
|
|
if: ${{ github.repository == 'gastownhall/beads' && startsWith(github.ref, 'refs/tags/v') }}
|
|
needs: goreleaser
|
|
runs-on: macos-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Extract version from tag
|
|
id: version
|
|
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Build darwin/arm64
|
|
env:
|
|
CGO_ENABLED: "1"
|
|
GOARCH: arm64
|
|
GOOS: darwin
|
|
run: |
|
|
go build -tags "gms_pure_go netgo" \
|
|
-ldflags "-s -w -X main.Version=${{ steps.version.outputs.version }} -X main.Build=$(git rev-parse --short HEAD) -X main.Commit=$(git rev-parse HEAD) -X main.Branch=$(git branch --show-current)" \
|
|
-o bd-darwin-arm64 ./cmd/bd
|
|
./scripts/verify-cgo.sh bd-darwin-arm64
|
|
# Verify no ICU runtime dependency leaked through
|
|
if otool -L bd-darwin-arm64 | grep -qi icu; then
|
|
echo "ERROR: bd-darwin-arm64 has unexpected ICU runtime dependency" >&2
|
|
otool -L bd-darwin-arm64 >&2
|
|
exit 1
|
|
fi
|
|
codesign -s - -f bd-darwin-arm64
|
|
|
|
- name: Build darwin/amd64
|
|
env:
|
|
CGO_ENABLED: "1"
|
|
GOARCH: amd64
|
|
GOOS: darwin
|
|
# macos-latest is arm64; cross-compile CGO C code for x86_64
|
|
CC: clang -arch x86_64
|
|
CXX: clang++ -arch x86_64
|
|
run: |
|
|
go build -tags "gms_pure_go netgo" \
|
|
-ldflags "-s -w -X main.Version=${{ steps.version.outputs.version }} -X main.Build=$(git rev-parse --short HEAD) -X main.Commit=$(git rev-parse HEAD) -X main.Branch=$(git branch --show-current)" \
|
|
-o bd-darwin-amd64 ./cmd/bd
|
|
./scripts/verify-cgo.sh bd-darwin-amd64
|
|
if otool -L bd-darwin-amd64 | grep -qi icu; then
|
|
echo "ERROR: bd-darwin-amd64 has unexpected ICU runtime dependency" >&2
|
|
otool -L bd-darwin-amd64 >&2
|
|
exit 1
|
|
fi
|
|
codesign -s - -f bd-darwin-amd64
|
|
|
|
- name: Smoke test embedded dolt (arm64 native)
|
|
run: |
|
|
# arm64 binary runs natively on macos-latest
|
|
bd="$(pwd)/bd-darwin-arm64"
|
|
tmpdir=$(mktemp -d)
|
|
projdir="$tmpdir/smoketest"
|
|
mkdir -p "$projdir"
|
|
cd "$projdir"
|
|
git init -b main
|
|
git config user.name "CI" && git config user.email "ci@test"
|
|
git commit --allow-empty -m "init"
|
|
"$bd" init --prefix smoketest
|
|
"$bd" create "smoke test" --type task
|
|
"$bd" list | grep -q "smoke test"
|
|
# Verify embedded mode (no server process)
|
|
if pgrep -f "dolt sql-server" >/dev/null 2>&1; then
|
|
echo "ERROR: unexpected dolt sql-server process running" >&2
|
|
exit 1
|
|
fi
|
|
echo "OK: embedded dolt smoke test passed"
|
|
cd - >/dev/null
|
|
rm -rf "$tmpdir"
|
|
|
|
- name: Package archives
|
|
run: |
|
|
version="${{ steps.version.outputs.version }}"
|
|
for arch in arm64 amd64; do
|
|
staging="beads_${version}_darwin_${arch}"
|
|
mkdir -p "$staging"
|
|
cp "bd-darwin-${arch}" "$staging/bd"
|
|
cp LICENSE README.md CHANGELOG.md "$staging/"
|
|
tar -czf "${staging}.tar.gz" -C "$staging" .
|
|
shasum -a 256 "${staging}.tar.gz" >> darwin-checksums.txt
|
|
done
|
|
|
|
- name: Upload to GitHub release
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
version="${{ steps.version.outputs.version }}"
|
|
for arch in arm64 amd64; do
|
|
gh release upload "v${version}" "beads_${version}_darwin_${arch}.tar.gz" --clobber
|
|
done
|
|
|
|
- name: Append checksums to release checksums.txt
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
version="${{ steps.version.outputs.version }}"
|
|
# Download existing checksums, append darwin entries, re-upload
|
|
gh release download "v${version}" --pattern checksums.txt --dir /tmp/checksums
|
|
cat darwin-checksums.txt >> /tmp/checksums/checksums.txt
|
|
gh release upload "v${version}" /tmp/checksums/checksums.txt --clobber
|
|
|
|
attest-release:
|
|
# Attest the complete release after GoReleaser assets and the native macOS
|
|
# archives have both populated checksums.txt.
|
|
if: ${{ github.repository == 'gastownhall/beads' && startsWith(github.ref, 'refs/tags/v') }}
|
|
needs: [goreleaser, goreleaser-macos]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
|
|
|
|
- name: Resolve release asset paths
|
|
id: assets
|
|
run: |
|
|
mkdir -p dist
|
|
echo "checksums=dist/checksums.txt" >> "$GITHUB_OUTPUT"
|
|
echo "sbom=dist/beads-${GITHUB_REF_NAME}.spdx.json" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Download release checksums
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: gh release download "${GITHUB_REF_NAME}" --pattern checksums.txt --dir dist
|
|
|
|
- name: Generate release SBOM
|
|
uses: anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610 # v0
|
|
with:
|
|
path: .
|
|
format: spdx-json
|
|
output-file: ${{ steps.assets.outputs.sbom }}
|
|
upload-artifact: false
|
|
upload-release-assets: false
|
|
|
|
- name: Upload release SBOM
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: gh release upload "${GITHUB_REF_NAME}" "${{ steps.assets.outputs.sbom }}" --clobber
|
|
|
|
- name: Attest release artifacts
|
|
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4
|
|
with:
|
|
subject-checksums: ${{ steps.assets.outputs.checksums }}
|
|
|
|
- name: Attest release SBOM
|
|
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4
|
|
with:
|
|
subject-checksums: ${{ steps.assets.outputs.checksums }}
|
|
sbom-path: ${{ steps.assets.outputs.sbom }}
|
|
|
|
publish-pypi:
|
|
runs-on: ubuntu-latest
|
|
needs: [release-package-mcp, goreleaser]
|
|
if: ${{ github.repository == 'gastownhall/beads' && startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, '-') }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
|
|
with:
|
|
python-version: '3.14'
|
|
|
|
- name: Install uv
|
|
run: python -m pip install uv==0.11.16
|
|
|
|
- name: Download validated MCP dist
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
|
|
with:
|
|
name: release-mcp-dist
|
|
path: integrations/beads-mcp/dist
|
|
|
|
- name: Verify validated MCP dist
|
|
run: |
|
|
test -n "$(find integrations/beads-mcp/dist -maxdepth 1 -type f -print -quit)"
|
|
ls -la integrations/beads-mcp/dist
|
|
|
|
- name: Publish to PyPI
|
|
env:
|
|
TWINE_USERNAME: __token__
|
|
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
run: |
|
|
cd integrations/beads-mcp
|
|
uv tool run twine upload dist/*
|
|
|
|
publish-npm:
|
|
runs-on: ubuntu-latest
|
|
needs: [release-package-npm, goreleaser, goreleaser-macos]
|
|
if: ${{ github.repository == 'gastownhall/beads' && startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, '-') }}
|
|
permissions:
|
|
contents: read
|
|
id-token: write # Required for npm provenance/trusted publishing
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
|
with:
|
|
node-version: '24'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Update npm for OIDC trusted publishing
|
|
run: npm install -g npm@latest # Requires npm >= 11.5.1 for trusted publishing
|
|
|
|
- name: Publish to npm
|
|
run: |
|
|
cd npm-package
|
|
npm publish --access public
|
|
# Uses OIDC trusted publishing - no token needed
|
|
# Provenance attestations are automatic with trusted publishing
|