feat: add tag-triggered release pipeline (PyPI wheel, Release binaries, Homebrew) - #6
Merged
Merged
Conversation
3 tasks
This was referenced Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3.
Tag-triggered release for
codeanalyzer-iac, mirrored from thecodeanalyzer-typescriptreference with Bun replaced by single-host, CGO-free Go cross-compilation.What is added
packaging/python/: hatchling projectcodeanalyzer-iac; console scriptscaniacandcodeanalyzer-iac;codeanalyzer_iac.bin_path();build_wheels.shbuilds five platform wheels (linux amd64/arm64, macOS x86_64/arm64, windows amd64) carrying the binary under_bin/; PEP 440 version guard.packaging/homebrew/generate_formula.sh,packaging/install/caniac-installer.sh..github/workflows/release.yml:v*.*.*trigger plusworkflow_dispatch; version verified against the tag;make vet && make test && make schema-checkas a hard gate; wheel build and smoke test; a single delete-tag step on any pre-publish failure; GitHub Release with per-asset SHA256; PyPI via Trusted Publishing withskip-existing; isolatedhomebrewjob;contents: writeandid-token: writeon the release job only,contents: readonhomebrew.make wheels; README install section and tag-format rule.Version lockstep
The tag is the only source:
build_wheels.shstamps__version__, the Go binary gets-X main.version, and the emittedanalyzer.versionis the same string. The workflow checkscaniac --versionagainst the tag.Verified locally
Five wheels built from
PKG_VERSION=0.1.0rc0; fresh venvpip installof the host wheel printscaniac version 0.1.0rc0,bin_path()resolves inside site-packages, a fixture analysis runs from the installed binary; linux and windows wheels carry_bin/caniac[.exe]; formula sha256 values matchshasum -a 256;actionlint,shellcheck,go test ./...,gofmt -l,git diff --checkclean.PKG_VERSION=0.1.0-devis rejected with a readable message.Two departures from the reference, on purpose
continue-on-errorplussteps.test.conclusion == 'failure';conclusionis post-continue-on-errorand alwayssuccess, so that gate never fires. Here the test step fails the job outright and oneif: failure()step deletes the tag. Same defect exists in the TypeScript and Python analyzers' workflows; follow-on issues to be filed.discussion_category_name: Discussions are disabled on this repo and the field would 422 the Release step. The org-level announcement (best effort) stays.Before the first tag (outside this PR)
PyPI project
codeanalyzer-iacwith a Trusted Publisher forcodellm-devkit/codeanalyzer-iac/release.yml; repo secretHOMEBREW_TAP_TOKEN; optionalORG_DISCUSSIONS_TOKEN. Tags must be PEP 440 normalized (v0.1.0,v0.1.0rc1).