This document describes how a maintainer cuts a versioned release.
- You have write access to
war-and-code/dircue. - The commit you intend to release is on
mainand has an annotated tag (e.g.v1.0.0).- The release validator checks that it is annotated and points to the exact commit; it does not verify a local GPG/SSH signature.
- Asset attestations and the Sigstore-signed checksum manifest provide the release's workflow provenance.
- The tag must exist in the remote before dispatching the release workflow.
- Committed Markdown release notes exist at a path you control (e.g.
docs/releases/1.0.0.md).
The version string is injected at build time via Go ldflags:
-X github.com/war-and-code/dircue/internal/cli.Version=<version>
The variable is Version in internal/cli/cli.go. scripts/release.py applies this flag for every platform binary it builds.
Before creating a release tag, finalize the version entry in CHANGELOG.md (remove the (unreleased) marker only as part of the release), review the committed release notes for that version, and confirm their claims and receipts describe the exact commit to tag.
The release notes are copied into the draft GitHub Release as written.
Compare the candidate with the most recent published executable using tests/compatibility_next/minor.py. Verify the downloaded archive and pin the executable hash and reported release version. Include the pinned structural worker when native parsing is supported on the test host. Retain the receipt, candidate build command and source commit. Investigate any stdout, stderr or exit-code difference rather than normalizing it away. List intended interface changes in CHANGELOG.md.
The inherited CLI matrix is one gate. Also run the current semantic, schema and map-corpus checks, and smoke-test the packaged wheel with the release tooling. Measure representative workloads against the published binary before claiming performance improvements; report added analysis costs and memory tradeoffs. Local checks on one host do not replace the full cross-platform CI checks.
git tag -a v1.0.0 -m "Release 1.0.0" <commit-sha>
git push origin v1.0.0Go to Actions → Prepare draft release → Run workflow and fill in:
| Input | Example |
|---|---|
| Version | 1.0.0 (no leading v) |
| Commit | the exact 40-character SHA of the tagged commit |
| Notes path | docs/releases/1.0.0.md (relative to repo root) |
The workflow:
- Validates the tag, commit, and release notes path. 2. Builds
CGO_ENABLED=0 -trimpathGo binaries for all five platforms (linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64) viascripts/release.py. 3. Packages platform archives, wheels, and the native Rust structural worker. 4. Runs per-platform smoke tests (binary execution,--version, map output). 5. Assembles SHA256SUMS and per-platform provenance. 6. Creates a draft GitHub Release. It is never auto-published.
Download and inspect the draft assets. Run:
set -eu
# Download all draft assets (requires GitHub token with read access, e.g. GH_TOKEN)
gh release download v1.0.0 --repo war-and-code/dircue --dir /tmp/dircue-review
cd /tmp/dircue-review
# Verify every attested archive, wheel, JSON receipt and checksum manifest.
for f in *.tar.gz *.zip *.whl *.json SHA256SUMS; do
# The signature bundle is created after the attestation step and verified below.
[ "$f" = SHA256SUMS.sigstore.json ] && continue
gh attestation verify "$f" \
--repo war-and-code/dircue \
--signer-workflow war-and-code/dircue/.github/workflows/release-candidate.yml \
--source-ref refs/heads/main
done
# Verify the cosign signature on SHA256SUMS
cosign verify-blob \
--bundle SHA256SUMS.sigstore.json \
--certificate-identity 'https://github.com/war-and-code/dircue/.github/workflows/release-candidate.yml@refs/heads/main' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
SHA256SUMS
# Verify archive checksums
sha256sum --check SHA256SUMS
# Verify the version strings on Linux amd64 after checking its archive
# (the tar contains both dircue and a dirq -> dircue symlink)
tar -xzf dircue_1.0.0_linux_amd64.tar.gz
./dircue --version
./dirq --versionOn another host, use that host's matching archive and executable. For example, macOS uses dircue from the Darwin archive and Windows uses dircue.exe from the Windows archive.
cosign can be installed via brew install cosign, go install github.com/sigstore/cosign/v3/cmd/cosign@latest, or from the Sigstore release page.
When satisfied, publish the draft release through the GitHub UI.
Publishing is always a deliberate manual step; the workflow never does it.
After the GitHub Release is public, use the separate, manually dispatched PyPI publishing workflow. It verifies and uploads the exact release wheels, subject to the protected pypi environment's approval. Publishing the GitHub Release or pushing a tag does not trigger a PyPI upload.
- The release workflow enforces a clean committed checkout with
scripts/draft_release.py validate. - Builds use
CGO_ENABLED=0 -trimpath -mod=readonly -buildvcs=falseand pinned Go and Rust toolchains. - Go dependencies are downloaded into each clean release build's fresh module cache with bounded retries and credential-redacted diagnostics before compilation.
GOENV=off GOFLAGS='' GOEXPERIMENT='' GOAMD64=v1 GOARM64=v8.0are set to eliminate host-environment variation.
- Dependency updates must be reviewed manually, as of this writing.
- The CI policy prohibits
schedule:triggers and automated dependency PRs (Dependabot/Renovate) until explicitly enabled at some future date.
- The CI policy prohibits
- The Enry and go-git forks require canonical regeneration and provenance checks on version bumps.
- An automated bump that skips those checks is a correctness defect.