Repository navigation
Trigger the release by merging the Release PR, not by pushing a tag - #14
Merged
Merged
Conversation
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
v1.0.3 is the motivating case:
prepare-releaseran, the Release PR merged, CI went green — and nothing was released, because the manualgit push origin v1.0.3never happened. A skipped step that produces a fully green pipeline and no release is the worst kind of manual step.What changed
.github/workflows/release.ymlnow triggers on push tomaininstead of on av*tag, and omits theversioninput. The shared workflow:app.conf(no retyping it into a tag)vX.Y.Ztag itself viagh release create --target <sha>The local
versionjob that strippedvfrom the tag name is gone — nothing to strip.Release flow, before → after
prepare-releaseprepare-releasegit tag+git pushNo new credentials
A tag pushed with
GITHUB_TOKENdoes not triggeron: push: tags, so auto-pushing the tag would have required a PAT or GitHub App token. Minting the tag inside the run that already built the package avoids that entirely.contents: writeon the caller job is the same grant as before.Splunkbase publish is unchanged
Still gated on this repo's
splunkbaseEnvironment (required reviewer), held before any step runs. Approve to publish; leave it unapproved and the GitHub Release stands with nothing uploaded — that approval is now the only human decision point after the merge.One behavioural note: previously "don't publish this one" could be expressed by simply never pushing the tag. Now the release always runs and the decision moves to the approval prompt, where rejecting marks the run failed even though it's a legitimate outcome. Adding a clean-green skip would mean carrying a flag from the dispatch through to post-merge (e.g. a
no-publishPR label); deliberately left out as not worth the complexity.Depends on
apius-tech/splunk-app-ci#6 — makes
versionoptional and adds the resolution/skip job. Merge that first. Until it lands,@mainstill declaresversionas required and the Actions linter flags this caller as invalid.ADR-0004 has been amended to match (kept in the private docs mirror, since
docs/adr/is gitignored here).Verification
Workflow YAML parsed and inputs checked. The auto path genuinely can't be exercised before the next real release — the first
prepare-releasedispatch after both PRs merge is the test. Worth doing that on a patch version so a failure is cheap.