Repository navigation
Release on merge: derive the version, mint the tag, promote one artifact - #6
Merged
Merged
Conversation
The release flow required a human to push the tag vX.Y.Z after merging the Release PR. Forgetting it silently produced no release at all (apius_lang_entropy v1.0.3 sat merged and untagged), and it made the version a value typed twice — once into the prepare-release dispatch, once into the tag name. release.yml now supports being triggered by the merge itself: - New `resolve` job derives the version from the stamped app.conf (via a new `current-version` CLI command) when the caller omits `version`, and skips the release when that version is already tagged. Ordinary main pushes are no-ops and re-runs cannot double-release. - The tag is created by `gh release create --target <sha>` instead of pushed from a job. A tag pushed with GITHUB_TOKEN does not trigger `on: push: tags`, so minting it inside the run that already built the package avoids both a second event and a PAT. - The `splunkbase` job downloads the artifact the release job inspected instead of rebuilding it. build_package normalizes ownership, but tarfile's gzip header carries a fresh mtime, so the rebuild was never byte-identical to the tarball attached to the GitHub Release. Backward compatible: `version` became optional rather than changing meaning, and a tag-triggered caller passing it explicitly always releases, as before. This keeps splunk-app-template and apius_splunk_qradare_integration working untouched. The Splunkbase publish is unchanged and still gated on the caller's `splunkbase` Environment approval.
pbujna-apius
added a commit
to apius-tech/apius_lang_entropy
that referenced
this pull request
Aug 11, 2026
) Merging the "Release vX.Y.Z" PR left the repo stamped but inert until a maintainer remembered to push the tag. When that was missed the whole pipeline stayed green with nothing released — v1.0.3 sat merged and untagged. The caller now runs on push to main and omits `version`, so the shared workflow reads it from the stamped app.conf, skips the release when that version is already tagged, and creates the tag itself alongside the GitHub Release. A release is now two human actions: dispatch prepare-release with the version, then approve the Splunkbase deployment. The Splunkbase gate is unchanged. Requires apius-tech/splunk-app-ci#6 (makes `version` optional and adds the version-resolution job); until that merges, @main still declares `version` as required and this caller will not validate.
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.
Why
Releases needed a human to push
vX.Y.Zafter merging the Release PR. Forgetting it produces no release at all, silently —apius_lang_entropyv1.0.3 sat merged and untagged until someone noticed. It also made the version a value typed twice (dispatch input, then tag name) with no cross-check.What changed
resolvejob (new) — derives the version from the stampedapp.confwhen the caller omitsversion, and decides whether there is anything to release:So ordinary pushes to main are no-ops, and a re-run cannot double-release.
The tag is minted, not pushed —
gh release create --target <sha>creates it. A tag pushed withGITHUB_TOKENdoes not triggeron: push: tags, so doing it in the run that already built the package avoids both the second event and a PAT. No new credentials.One artifact, built once —
splunkbasenow downloads whatreleaseinspected instead of rebuilding.build_packagenormalizes ownership, buttarfile.open(..., "w:gz")writes a fresh gzip mtime, so the rebuilt tarball was never byte-identical to the one attached to the GitHub Release. The published bytes are now provably the inspected bytes.current-versionCLI command — reads back[launcher] version, sharingstamp_conf_version's stanza/key parsing so the release reads exactly whatprepare-releasewrote. Covered by tests, including that it ignores aversionkey in another stanza.Not changed
The Splunkbase publish still sits behind the caller's
splunkbaseEnvironment approval, held before any step runs. Approve to publish; leave it unapproved and the GitHub Release stands with nothing uploaded.Compatibility
versionbecame optional rather than changing meaning.splunk-app-templateandapius_splunk_qradare_integrationkeep their tag triggers and passversionexplicitly, so they behave exactly as before and need no change. Onlyapius_lang_entropymigrates to the auto trigger (separate PR, with the ADR-0004 amendment).Verification
pytest -q(10 passed),ruff check,ruff format --checkall pass. Workflow YAML parsed and job graph checked:splunkbaseneeds[resolve, release]and itsifavoidsalways(), so a skipped release correctly skips the publish.The end-to-end auto path cannot be exercised until a caller is migrated — that is the follow-up PR, and its first real release is the test.