Add reusable Release and Promote workflows#108
Merged
Conversation
Mutualize the release flow copy-pasted across ~9 org repos into two workflow_call workflows: - release.yaml computes the next semver (alpha/beta/GA x patch/minor/major) off the last GA tag reachable from the branch and pushes an annotated v* tag with a GitHub App token; exposes a `tag` output and a `dry-run` input. - promote.yaml creates a GitHub Release from the pushed tag (pre-release on hyphenated tags). The release title is the tag alone; `product-name` optionally prefixes it. Also add docs/release-promote.md, a release-dry-run job in tests.yaml, and a CLAUDE.md entry. Adapted from scality/raidmgmt#77.
charlesprost
approved these changes
Jul 9, 2026
1 task
ezekiel-alexrod
added a commit
to scality/raidmgmt
that referenced
this pull request
Jul 10, 2026
Replace the local release/promote copies with the reusable workflows from scality/workflows: the semver computation and tag push move to release.yaml@v2.9.1, and the GitHub Release creation to promote.yaml@v2.9.1. The quality gate (go test on the exact commit being tagged) stays in this repo, as releases are cut from main without re-running pre-merge. Part of the org-wide migration to scality/workflows (PR scality/workflows#108).
ezekiel-alexrod
added a commit
to scality/raidmgmt
that referenced
this pull request
Jul 13, 2026
Replace the local release/promote copies with the reusable workflows from scality/workflows: the semver computation and tag push move to release.yaml@v2.9.1, and the GitHub Release creation to promote.yaml@v2.9.1. The quality gate (go test on the exact commit being tagged) stays in this repo, as releases are cut from main without re-running pre-merge. Part of the org-wide migration to scality/workflows (PR scality/workflows#108).
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.
What
Adds two reusable workflows that mutualize the release flow currently
copy-pasted across 9 repos (go-errors, crl-operator, disk-management-agent,
file-reflector, metalk8s-registry-node-agent, metalk8s-registry-operator,
prometheus-postgres-adapter, static-oci-registry, raidmgmt):
release.yaml(workflow_call): computes the next semver(
alpha/beta/GA×patch/minor/major) off the last GA tag reachablefrom the current branch and pushes an annotated
v*tag with the GitHub Apptoken. Exposes a
tagoutput and adry-runinput.promote.yaml(workflow_call): creates a GitHub Release from a pushedv*tag, marked pre-release when the tag contains a hyphen.Plus:
docs/release-promote.md(library and service caller examples), arelease-dry-runjob intests.yamlexercising the version computation onevery PR, and a CLAUDE.md table update.
Why
The
prepare-version/create-releasepair exists in 9 copies across the org,so every fix means 9 PRs. This factors it into a single maintained
implementation, adapted from scality/raidmgmt#77 (itself derived from
go-errors/nodeip-discovery).
Compared to the legacy copies, this version:
git tag --merged HEAD --sort=version:refnameinstead of
--sort=taggerdate: an out-of-order hotfix tag (e.g.v1.0.1tagged after
v2.0.0) can never be picked as the base version, and thecomputation stays correct if per-minor release branches (
dev/X.Y) areintroduced;
|| true) so the0.0.0fallback fires on a repowith no GA tag yet;
contents: readin release,contents: writein promote);version-type/version-scopeat runtime (workflow_callcannotexpress
type: choice, so the choices stay in the callers'workflow_dispatch);dry-run(compute and validate without pushing), which makes theworkflow testable in PR CI;
git fsck/git gccalls, pointless on a fresh CI clone.Design notes
v1.2.3): the repository alreadyprovides context in the GitHub UI, so the title is not prefixed with the repo
name by default.
product-nameis an optional input that prefixes both therelease title and the tag annotation (e.g.
product-name: MetalK8s→MetalK8s v1.2.3), useful for monorepos or when the product name differsfrom the repository name.
GITHUB_TOKENdo not triggeron: push: tags, so Promote would never fire.actions-app-idis an explicit input;ACTIONS_APP_PRIVATE_KEYis passed viasecrets: inherit.the caller (
needs: build) so a broken build still blocks the release; a purelibrary calls Promote directly: the tag is the artifact.
go test, a service may gate differently.pins used in product repos.
Migration plan (follow-up PRs, not in this PR)
v2.9.0.taggerdatefix lands with the migration, no separate backport needed.platform-*repos (currentlyrelease-published → test after publication) onto the same pair.