Files
better-claude-config/.github/workflows/release.yml
T
BCC Agent cd38fd0c78
CI / Lint (ruff) (pull_request) Successful in 6s
CI / Tests (py3.10 / ubuntu-latest) (pull_request) Successful in 12s
CI / Tests (py3.12 / windows-latest) (pull_request) Successful in 23s
CI / Tests (py3.12 / ubuntu-latest) (pull_request) Successful in 11s
CI / Tests (py3.13 / ubuntu-latest) (pull_request) Successful in 13s
Sign release checksums with Ed25519 (#63)
Publish SHA256SUMS for every release archive and sign it with a
detached Ed25519 signature (SHA256SUMS.sig), since paid code signing
(macOS Developer ID, Windows Authenticode) and Sigstore keyless (needs
a Fulcio-trusted OIDC issuer; self-hosted Gitea isn't one) are both
out of budget/scope.

- scripts/sign_checksums.py: dependency-light (cryptography only)
  helper to hash a directory of files into a sha256sum(1)-compatible
  SHA256SUMS manifest, sign it (domain-separated: b"bcc-release-v1|"
  + raw manifest bytes), and verify a signature. CLI has generate/
  sign/verify subcommands; verify doubles as the check path.
- tests/test_checksums.py: 15 unit + CLI-subprocess tests covering
  hashing, manifest formatting, sign/verify roundtrip, tamper
  detection, wrong-key rejection, domain-separation, and the
  no-key-provided failure path (must error, never write an empty/
  bogus .sig).
- .github/workflows/release.yml: Publish Release job now checks out
  the repo, flattens build artifacts, generates SHA256SUMS, and signs
  it from the RELEASE_SIGNING_KEY secret (base64 raw Ed25519 seed) if
  present. If the secret is absent, the release still publishes with
  a loud ::warning:: and no .sig — it never fails the release or
  publishes a bogus signature.
- README.md: new 'Verifying your download' section with the (still
  placeholder) public key, sha256sum -c / Get-FileHash commands, and
  an explicit statement that this does not remove Gatekeeper/
  SmartScreen warnings.
- requirements-dev.txt / ci.yml: add cryptography as a dev/test
  dependency for the new script and its tests.

Touches no files from bcc_core.py / tests/test_core.py /
pyproject.toml / bcc.spec to avoid colliding with concurrent work on
those files.
2026-07-12 17:30:09 -04:00

210 lines
7.7 KiB
YAML

name: Build & Release
# Trigger on version tags (e.g. git tag v1.0.0 && git push --tags)
on:
push:
tags:
- "v*"
# Manual run from Actions tab (useful for testing the workflow itself)
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
platform: macOS
artifact: BetterClaudeConfig-macOS.zip
- os: windows-latest
platform: Windows
artifact: BetterClaudeConfig-Windows.zip
- os: ubuntu-latest
platform: Linux
artifact: BetterClaudeConfig-Linux.tar.gz
runs-on: ${{ matrix.os }}
name: Build (${{ matrix.platform }})
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.12 (Linux)
if: runner.os == 'Linux'
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Set up Python venv (macOS)
if: runner.os == 'macOS'
run: |
PYBIN="$(command -v python3.12 || echo /opt/homebrew/bin/python3.12)"
"$PYBIN" -m venv .venv
echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
- name: Set up Python venv (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
py -3.12 -m venv .venv
Add-Content -Path $env:GITHUB_PATH -Value "$env:GITHUB_WORKSPACE\.venv\Scripts"
- name: Install dependencies
run: pip install -r requirements-dev.txt
# macOS: build app.icns from source PNGs (iconutil is built into macOS)
- name: Generate app.icns (macOS)
if: runner.os == 'macOS'
run: python scripts/build_icons.py
# Windows: generate app.ico using Pillow (already installed via requirements-dev.txt)
- name: Generate app.ico (Windows)
if: runner.os == 'Windows'
run: python scripts/build_icons.py
- name: Build with PyInstaller
run: pyinstaller bcc.spec
# ── Package ──────────────────────────────────────────────────────────
- name: Package (macOS)
if: runner.os == 'macOS'
run: |
cd dist
zip -r --symlinks "../${{ matrix.artifact }}" BetterClaudeConfig.app
- name: Package (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Compress-Archive -Path dist\BetterClaudeConfig.exe `
-DestinationPath "${{ matrix.artifact }}"
- name: Package (Linux)
if: runner.os == 'Linux'
run: |
tar -czf "${{ matrix.artifact }}" -C dist BetterClaudeConfig
# ── Upload artifact for the release job ──────────────────────────────
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
# ── Create GitHub Release with all three artifacts ──────────────────────
release:
name: Publish Release
needs: build
runs-on: ubuntu-latest
# Only publish when a tag was pushed (not on workflow_dispatch without a tag)
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
# Needed for scripts/sign_checksums.py — the release job otherwise
# only downloads build artifacts, it doesn't check out the repo.
- name: Checkout
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
# download-artifact@v3 nests each artifact under a directory named
# after it (artifacts/<name>/<name>). Flatten into one directory so
# SHA256SUMS lists plain filenames, matching what `sha256sum -c`
# expects when run from inside an extracted release download.
- name: Collect release files
run: |
mkdir -p release-files
find artifacts -type f -exec cp {} release-files/ \;
ls -la release-files
- name: Generate SHA256SUMS
run: python3 scripts/sign_checksums.py generate release-files --out release-files/SHA256SUMS
# ── Sign the checksum manifest (best-effort) ──────────────────────
#
# BCC binaries are not code-signed (no budget for a paid cert). This
# is the free half: a checksum manifest, detached-signed with
# Ed25519, so a tampered download is detectable by anyone who
# checks. It does NOT remove Gatekeeper/SmartScreen warnings.
#
# The private key is a repo secret (RELEASE_SIGNING_KEY, base64 raw
# Ed25519 seed) generated via the Catalog Console (#62). If it's not
# set, we still publish the release — just without a .sig — rather
# than fail the release outright.
- name: Check for signing key
id: signing
run: |
if [ -n "${{ secrets.RELEASE_SIGNING_KEY }}" ]; then
echo "has_key=true" >> "$GITHUB_OUTPUT"
else
echo "has_key=false" >> "$GITHUB_OUTPUT"
fi
- name: Install signing dependencies
if: steps.signing.outputs.has_key == 'true'
run: pip install cryptography
- name: Sign SHA256SUMS
if: steps.signing.outputs.has_key == 'true'
env:
RELEASE_SIGNING_KEY: ${{ secrets.RELEASE_SIGNING_KEY }}
run: |
python3 scripts/sign_checksums.py sign \
--sums release-files/SHA256SUMS \
--out release-files/SHA256SUMS.sig
- name: Warn — release will be unsigned
if: steps.signing.outputs.has_key != 'true'
run: |
echo "::warning::RELEASE_SIGNING_KEY secret is not set — this release is being published WITHOUT a signed SHA256SUMS.sig. Add the secret (base64 raw Ed25519 seed, generated via the Catalog Console, #62) before the next tag."
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: Better Claude Config ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: false
files: |
artifacts/**/*
release-files/SHA256SUMS*
body: |
## Better Claude Config ${{ github.ref_name }}
A GUI for managing MCP server configurations for Claude Desktop and Claude Code — no hand-editing JSON.
### Download
| Platform | File |
|----------|------|
| macOS | `BetterClaudeConfig-macOS.zip` — unzip and drag **BetterClaudeConfig.app** to Applications |
| Windows | `BetterClaudeConfig-Windows.zip` — unzip and run **BetterClaudeConfig.exe** |
| Linux | `BetterClaudeConfig-Linux.tar.gz` — extract and run **BetterClaudeConfig** |
### macOS note
The app is not code-signed. On first launch, right-click → **Open** to bypass Gatekeeper, or run:
```
xattr -cr /Applications/BetterClaudeConfig.app
```
### Verifying your download
Every release includes `SHA256SUMS` (and, when the signing key is configured, a detached `SHA256SUMS.sig`). See [Verifying your download](https://git.avezzano.io/the_og/better-claude-config#verifying-your-download) in the README for commands. This proves you got the file we published — it does not remove Gatekeeper/SmartScreen warnings.
### Requirements
No Python installation needed — the app is self-contained.