.github, hack, docs: release-cut runs ci on a push to main and tags as the releaser app; release-roll builds from the pushed tag; Actions files are .yaml and actions are at version tags #21
No reviewers
Labels
No labels
accessibility
bug
dependencies
documentation
duplicate
enhancement
go
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/nats-operator!21
Loading…
Reference in a new issue
No description provided.
Delete branch "mikluko/release-on-tag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The flow:
main->release-cut: jobcicallsci.yaml; jobcutneeds it, readsCHANGELOG.md, and pushesvX.Y.Zon the pushed commit as the releaser GitHub App. It tags only wheremikluko/action-changelogreports the newest entrydue: it names a version, no tag names it, and it is not a prerelease. Otherwise the action writes why to the step summary and the Cut step is skipped.release-roll, titled "Releasing vX.Y.Z": it fails unless the tag is the changelog's newest version at that commit, then builds and signs the images, attests, pushes the chart, and creates the GitHub release last.release-rollrun is recovered by re-running it;release-cutskips a tagged version.release-rollrun by hand is the dry run, titled "Dry run of a release from ": the changelog's newest version if the action reports it due, a prerelease included, nothing pushed, nothing tagged.release-cutfollowsuptime-com/up2-monitoring'srelease.yamland thecut-releaseworkflow it calls, inlined because that workflow is private.ci.yamlruns onpull_requestandworkflow_callonly: onmainit runs asrelease-cut's job, and its checks there are namedci / ...underrelease-cut. A prerelease entry is not cut; a prerelease tag pushed by hand still rolls.Every Actions file moves to
.yaml: the workflows,setup-hugo/action.yamland.github/zizmor.yaml. GitHub treats a renamed workflow file as a new workflow, so the run history ofci,docs,e2eandreleasestarts fresh under the new files and the old entries stay listed for the deleted files. Nothing in the tree depends on a workflow file name from outside it: there is no status badge.Every action is referenced by its major version tag in place of a commit SHA, and zizmor's
unpinned-usespolicy isref-pin.setup-ko,cosign-installerandzizmor-actionpublish no major tag and stay atv0.10,v4.1.2andv0.6.4.helm/kind-actionstays atv1.15.0: itsv1tag is seven commits behind that release..github/actionlint.yamlignores two findings actionlint v1.7.12 raises from stale inputs ofcreate-github-app-token@v3.Verifying a release
From the first release cut this way, the cosign certificate identity is
https://github.com/mikluko/nats-operator/.github/workflows/release-roll.yaml@refs/tags/v<version>, andgh attestation verifytakes--signer-workflow mikluko/nats-operator/.github/workflows/release-roll.yaml --source-ref refs/tags/v<version>. Releases 0.1.0 through 0.3.1 keeprelease.yml@refs/heads/main.SECURITY.mdhas both.Before the first cut
The app behind
vars.RELEASER_APP_CLIENT_IDandsecrets.RELEASER_APP_CERTis installed on this repository with Contents: read and write.release-cutnarrows its token to that.Workflows: read and write is not requested. A tag on a commit whose
.github/workflows/differs from every branch tip is rejected without it, according to community reports (community discussions 151442 and 141159, actions/checkout#1421); GitHub's documentation does not state the rule, and it is unverified here. That case ismainmoving past a workflow change while ci runs on the pushed commit.release-cutthen fails at the push, and pushing the tag by hand on that commit startsrelease-roll.Not proven until a real cut
ci.yamlcalled fromrelease-cuton a push tomain.release-roll.SECURITY.mdstates.gh release create --verify-tagon the tag the app pushed.Any
v*tag pushed by someone with write access startsrelease-roll; it publishes only if the tag is the changelog's newest version at the tagged commit. A tag ruleset admitting the app alone would close that, and is not part of this change.