Skip to content

chore: streamline release workflows and CLI build versioning#2131

Merged
jakobmoellerdev merged 2 commits into
open-component-model:mainfrom
morri-son:fix-workflow
Mar 31, 2026
Merged

chore: streamline release workflows and CLI build versioning#2131
jakobmoellerdev merged 2 commits into
open-component-model:mainfrom
morri-son:fix-workflow

Conversation

@morri-son

Copy link
Copy Markdown
Contributor

Summary

  • Remove branch input from cli-release.yml and controller-release.yml. The workflow_dispatch UI already has a branch selector (github.ref_name), making the redundant text input a source of inconsistency. Branch validation stays in parseBranch() inside release-candidate-version.yml.
  • Trim RC version summary table in release-versioning.js from 11 to 6 fields, dropping values that are either derivable from other fields or only useful for debugging (still logged via core.info()).
  • Add build_version input to cli.yml and wire it through cli/Taskfile.yml so the version embedded in ldflags can be overridden independently of the CTF/release version.

@morri-son morri-son requested a review from a team as a code owner March 31, 2026 11:05
@morri-son morri-son added the kind/chore chore, maintenance, etc. label Mar 31, 2026
@github-actions github-actions Bot added component/github-actions Changes on GitHub Actions or within `.github/` directory size/s Small labels Mar 31, 2026
@coderabbitai

coderabbitai Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 144fddb4-f23b-440f-ad81-4ac494f15ee2

📥 Commits

Reviewing files that changed from the base of the PR and between 81fba63 and a86ecde.

📒 Files selected for processing (5)
  • .github/scripts/release-versioning.js
  • .github/workflows/cli-release.yml
  • .github/workflows/cli.yml
  • .github/workflows/controller-release.yml
  • cli/Taskfile.yml

📝 Walkthrough

Walkthrough

The pull request decouples build versioning from release versioning by introducing a build_version input that overrides the compiled build version. Release workflows are updated to derive the branch ref from github.ref_name instead of manual input. The release versioning summary is simplified to display only final RC and release tags.

Changes

Cohort / File(s) Summary
Release workflow refactoring
.github/workflows/cli-release.yml, .github/workflows/controller-release.yml
Removed manual branch input; workflows now derive ref from ${{ github.ref_name }} for run labels, concurrency grouping, and checkout operations.
Build version override feature
.github/workflows/cli.yml, cli/Taskfile.yml
Added build_version workflow input (optional string) to override the compiled build version; updated build task to compute BUILD_VERSION separately from VERSION for linker flags.
Release summary simplification
.github/scripts/release-versioning.js
Removed step summary rows for base prefix and promotion-related tags; retained only Next RC Tag and Next Release Tag in output.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • matthiasbruns
  • frewilhelm
  • jakobmoellerdev

Poem

🐰 No more branch inputs, git ref guides the way,
Build version hops free from release today,
Summary tags simplified, clean and bright,
Decoupled versioning—now that's just right!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and accurately summarizes the main changes: removing the branch input from workflows and adding build versioning support.
Description check ✅ Passed The description is well-organized and clearly related to the changeset, explaining the three main objectives with specific details about what was changed and why.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…rkflow job summary.

On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
@jakobmoellerdev jakobmoellerdev enabled auto-merge (squash) March 31, 2026 14:25
@jakobmoellerdev jakobmoellerdev merged commit cf30323 into open-component-model:main Mar 31, 2026
19 checks passed
@morri-son morri-son deleted the fix-workflow branch March 31, 2026 14:42
morri-son added a commit to morri-son/open-component-model that referenced this pull request Apr 14, 2026
…mponent-model#2131)

## Summary

- **Remove `branch` input** from `cli-release.yml` and
`controller-release.yml`. The workflow_dispatch UI already has a branch
selector (`github.ref_name`), making the redundant text input a source
of inconsistency. Branch validation stays in `parseBranch()` inside
`release-candidate-version.yml`.
- **Trim RC version summary table** in `release-versioning.js` from 11
to 6 fields, dropping values that are either derivable from other fields
or only useful for debugging (still logged via `core.info()`).
- **Add `build_version` input** to `cli.yml` and wire it through
`cli/Taskfile.yml` so the version embedded in ldflags can be overridden
independently of the CTF/release version.

Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Co-authored-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Co-authored-by: Fabian Burth <fabian.burth@sap.com>
jakobmoellerdev pushed a commit that referenced this pull request Apr 15, 2026
## Summary

- **Fix publish gating in `cli.yml`**: When called via `workflow_call`
from `cli-release.yml`, `GITHUB_REF_NAME` inherits the caller's ref
(`releases/v0.4`) instead of the RC tag (`cli/v0.4.0-rc.1`). The
`should_push_oci_image` check only matched `main` or `cli/v*`, so the
Publish and Attest job was skipped for releases dispatched from release
branches. Now uses `inputs.ref` when available.
- **Update `RELEASE_PROCESS.md`**: Replace stale "Branch to release
from" input reference with the "Use workflow from" branch selector,
matching the workflow change in #2131.

## Root Cause

After #2131 removed the explicit `branch` text input from
`cli-release.yml`, the operator must select the `releases/v*` branch in
the GitHub UI "Use workflow from" dropdown. This sets `GITHUB_REF_NAME =
"releases/v0.4"` for the entire call chain.

`cli.yml`'s branch-check (`should_push_oci_image`) tests
`GITHUB_REF_NAME` against:
1. Default branch (`main`) — no match
2. `cli/v*` tag pattern — no match

Result: Publish and Attest skipped → Conformance skipped.

The v0.3 release worked because the old workflow was dispatched from
`main` (the text input carried the branch separately), so
`GITHUB_REF_NAME = "main"` matched condition 1.

## Fix

Use `inputs.ref` (the RC tag, e.g. `cli/v0.4.0-rc.1`) when present, fall
back to `GITHUB_REF_NAME` for direct triggers. The RC tag matches the
`cli/v*` pattern, enabling publish.

| Trigger | `inputs.ref` | Effective ref | Publishes |
|---------|-------------|---------------|-----------|
| `workflow_call` from `cli-release.yml` | `cli/v0.4.0-rc.1` |
`cli/v0.4.0-rc.1` | Yes |
| Push to `main` | empty | `main` | Yes |
| Push tag `cli/v0.4.0` | empty | `cli/v0.4.0` | Yes |
| Push to `releases/v0.4` | empty | `releases/v0.4` | No (build-only) |
| Pull request | n/a | step skipped | No |

## Test plan

- [ ] Verify the v0.4 release workflow can be re-run successfully from
`releases/v0.4` after this change is cherry-picked
- [ ] Dry-run a CLI release from a release branch to confirm Publish and
Attest job is no longer skipped

---------

Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Co-authored-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
ocmbot2 Bot pushed a commit to morri-son/open-component-model that referenced this pull request Apr 15, 2026
…ponent-model#2297)

## Summary

- **Fix publish gating in `cli.yml`**: When called via `workflow_call`
from `cli-release.yml`, `GITHUB_REF_NAME` inherits the caller's ref
(`releases/v0.4`) instead of the RC tag (`cli/v0.4.0-rc.1`). The
`should_push_oci_image` check only matched `main` or `cli/v*`, so the
Publish and Attest job was skipped for releases dispatched from release
branches. Now uses `inputs.ref` when available.
- **Update `RELEASE_PROCESS.md`**: Replace stale "Branch to release
from" input reference with the "Use workflow from" branch selector,
matching the workflow change in open-component-model#2131.

## Root Cause

After open-component-model#2131 removed the explicit `branch` text input from
`cli-release.yml`, the operator must select the `releases/v*` branch in
the GitHub UI "Use workflow from" dropdown. This sets `GITHUB_REF_NAME =
"releases/v0.4"` for the entire call chain.

`cli.yml`'s branch-check (`should_push_oci_image`) tests
`GITHUB_REF_NAME` against:
1. Default branch (`main`) — no match
2. `cli/v*` tag pattern — no match

Result: Publish and Attest skipped → Conformance skipped.

The v0.3 release worked because the old workflow was dispatched from
`main` (the text input carried the branch separately), so
`GITHUB_REF_NAME = "main"` matched condition 1.

## Fix

Use `inputs.ref` (the RC tag, e.g. `cli/v0.4.0-rc.1`) when present, fall
back to `GITHUB_REF_NAME` for direct triggers. The RC tag matches the
`cli/v*` pattern, enabling publish.

| Trigger | `inputs.ref` | Effective ref | Publishes |
|---------|-------------|---------------|-----------|
| `workflow_call` from `cli-release.yml` | `cli/v0.4.0-rc.1` |
`cli/v0.4.0-rc.1` | Yes |
| Push to `main` | empty | `main` | Yes |
| Push tag `cli/v0.4.0` | empty | `cli/v0.4.0` | Yes |
| Push to `releases/v0.4` | empty | `releases/v0.4` | No (build-only) |
| Pull request | n/a | step skipped | No |

## Test plan

- [ ] Verify the v0.4 release workflow can be re-run successfully from
`releases/v0.4` after this change is cherry-picked
- [ ] Dry-run a CLI release from a release branch to confirm Publish and
Attest job is no longer skipped

---------

Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Co-authored-by: Gerald Morrison (SAP) <gerald.morrison@sap.com> aa48cc6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/github-actions Changes on GitHub Actions or within `.github/` directory kind/chore chore, maintenance, etc. size/s Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants