Skip to content

chore: Enhance cli release workflow#1755

Merged
jakobmoellerdev merged 29 commits into
open-component-model:mainfrom
morri-son:enhance-cli-release
Feb 27, 2026
Merged

chore: Enhance cli release workflow#1755
jakobmoellerdev merged 29 commits into
open-component-model:mainfrom
morri-son:enhance-cli-release

Conversation

@morri-son

@morri-son morri-son commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

Implements a unified CLI release workflow with environment-gated promotion. RC and final release happen in a single workflow run, separated by a 14-day wait timer and required approval.

Key Changes

  • Single Workflow Run: RC creation and final promotion in one execution
  • Environment Gate: cli/release environment with 14-day wait + reviewer approval
  • Simplified Attestations: Direct verification via gh attestation verify (no bundle exports)
  • Consistent Changelogs: git-cliff for RC, copy body to final release notes
  • Central JS script release-versioning.js and unit tests for all release related versioning calculations

Documentation

See RELEASE_PROCESS.md for the complete release manager guide.

@morri-son morri-son added the kind/chore chore, maintenance, etc. label Feb 10, 2026
@github-actions github-actions Bot added component/github-actions Changes on GitHub Actions or within `.github/` directory size/m Medium size/l Large labels Feb 10, 2026
@morri-son morri-son closed this Feb 11, 2026
@morri-son morri-son deleted the enhance-cli-release branch February 11, 2026 16:47
@morri-son morri-son restored the enhance-cli-release branch February 11, 2026 17:07
@morri-son morri-son reopened this Feb 11, 2026
@morri-son morri-son linked an issue Feb 12, 2026 that may be closed by this pull request
6 tasks
@Skarlso

Skarlso commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Make sure to run these from time to time because:

➜ node export-attestations.test.js
file:///Users/skarlso/goprojects/sap/open-component-model/.github/scripts/export-attestations.test.js:9
import { parsePatterns, findAssets, bundleNameForAsset, sha256File } from "./export-attestations.js";
                                    ^^^^^^^^^^^^^^^^^^
SyntaxError: The requested module './export-attestations.js' does not provide an export named 'bundleNameForAsset'
    at #asyncInstantiate (node:internal/modules/esm/module_job:302:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:405:5)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:654:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)

Node.js v25.2.1

@morri-son morri-son force-pushed the enhance-cli-release branch 5 times, most recently from 57fa398 to ec58bc3 Compare February 13, 2026 12:55
@morri-son morri-son marked this pull request as ready for review February 13, 2026 12:57
@morri-son morri-son requested a review from a team as a code owner February 13, 2026 12:57
@matthiasbruns

Copy link
Copy Markdown
Contributor

I have created a doc along the multiple changes. WDYT? Is it useful to place it along the workflow files or under .github/docs ?

technical-deep-dive-github-release-workflows.md

I would - do it in this PR that we can review it as well :)

@Skarlso

Skarlso commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

So, I'm not sure how this is working, but there are several errors in the Javascripts... For example, once again, if I'm trying to run the test I'm getting import errors because certain things aren't exported:

➜ node export-attestations.test.js
file:///Users/skarlso/goprojects/sap/open-component-model/.github/scripts/export-attestations.test.js:9
import { parsePatterns, findAssets, bundleNameForAsset, sha256File } from "./export-attestations.js";
                                    ^^^^^^^^^^^^^^^^^^
SyntaxError: The requested module './export-attestations.js' does not provide an export named 'bundleNameForAsset'
    at #asyncInstantiate (node:internal/modules/esm/module_job:302:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:405:5)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:654:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)

Node.js v25.2.1
  • bundleNameForAsset is a private function (no export keyword) in export-attestations.js
  • parsePatterns, findAssets, and sha256File are defined in attestation-utils.js and only imported by
    export-attestations.js — they're not re-exported
  • IMAGE_TAG is not checked. It could be empty, then things break.
  • IMAGE_REF is never actually used.

I took a look at the attestation, I think we have a problem I didn't think about. The Attestation you download then upload if I understand correctly. This means you download it from the RC and the attestation will contain things like v2.0.0-rc which will be confusing for any consumer. Could you check that please to make sure the attestation is actually for the latest release and not the RC?

Comment thread .github/scripts/resolve-latest-rc.js Outdated
@Skarlso

Skarlso commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

Here are some more things we'll discuss:

  1. validate_final is just a test, this shouldn't be an entire separate job, it's a step. it's comparing two strings.
  2. You are passing around the changelog base64 between jobs is fragile and hits GitHub's ~1MB output limit on large changelogs
  3. There are too many javascript files right now. We have 9 JS files to maintain for what is
    essentially: "find latest tag, bump number, download/verify attestations." The version computation could be a 20-lines. The attestation export/verify wraps gh attestation download/verify with file renaming. This definitely needs to be smaller. I like that we are testing everything, but still.
  4. compute-rc-version.js switch/case with fall-through — The version computation logic (lines 125–158) uses switch(true) with intentional fall-through between cases. That's a footgun waiting to fire.
  5. cancel-in-progress: true. Are we sure this is really what we want?
  6. If tag_final succeeds but promote_image or release_final fails, you have an orphaned final tag with no release. We don't have anything in place to clean this up.
  7. There is a lot of duplication going on in here. Especially around the attestation and the test files.
    export-attestations.js and verify-attestations.js both import parsePatterns and findAssets from different places. The export test imports them from export-attestations.js, the verify test imports them from
    verify-attestations.js but they live in attestation-utils.js.

Actually, verify-attestations.js imports from ./attestation-utils.js but the test file imports parsePatterns, findAssets, and sha256File from ./verify-attestations.js which doesn't re-export them. Probably that's why the test is broken?
Both test files duplicate the exact same parsePatterns and findAssets test cases. That's test code you maintain twice.

Not sure what's going on there. :D
9. Export and verify could be one thing. They are one thing after all. :)
10. resolve-latest-rc.js and compute-rc-version.js. I really really feel these are doing the same thing. It's super difficult to explain why both exist. 🤔

And that's about it.

@morri-son

Copy link
Copy Markdown
Contributor Author

@Skarlso, thx for the feedback! I'll look into all of it. Also discussed with @jakobmoellerdev about soley relying on GH's attestation endpoint and API, so I will remove all attestation download, persist as asset, use that for verify. Will also check where to merge existing scripts.

One thing I need to add is a gate after the RC, so that promote needs a 4-eyes-principle.

@morri-son morri-son linked an issue Feb 16, 2026 that may be closed by this pull request
2 tasks
Comment thread .github/workflows/cli-release.yml
@morri-son morri-son requested a review from Skarlso February 16, 2026 16:08

@Skarlso Skarlso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I think this is now pretty okay.

Comment thread .github/scripts/release-versioning.js Outdated
Comment thread .github/scripts/release-versioning.js
morrison-sap and others added 3 commits February 24, 2026 16:02
On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Skarlso
Skarlso previously approved these changes Feb 25, 2026

@Skarlso Skarlso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try this out then. :)

piotrjanik
piotrjanik previously approved these changes Feb 25, 2026
Comment thread RELEASE_PROCESS.md Outdated
Comment thread RELEASE_PROCESS.md Outdated
Comment thread RELEASE_PROCESS.md
Comment thread RELEASE_PROCESS.md Outdated
Comment thread RELEASE_PROCESS.md
Comment thread RELEASE_PROCESS.md Outdated
Comment thread RELEASE_PROCESS.md Outdated
Comment thread RELEASE_PROCESS.md Outdated
Comment thread RELEASE_PROCESS.md Outdated
Comment thread RELEASE_PROCESS.md
morrison-sap and others added 2 commits February 26, 2026 09:56
…nor releases. Keep v0.X in examples.

On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Co-authored-by: Frederic Wilhelm <fre.wilhelm@gmail.com>
Signed-off-by: Gerald Morrison <67469729+morri-son@users.noreply.github.com>
@morri-son morri-son dismissed stale reviews from Skarlso and piotrjanik via d03a5e3 February 26, 2026 13:54
morri-son and others added 4 commits February 26, 2026 14:57
Co-authored-by: Frederic Wilhelm <fre.wilhelm@gmail.com>
Signed-off-by: Gerald Morrison <67469729+morri-son@users.noreply.github.com>
…nent-model into enhance-cli-release

On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>

@frewilhelm frewilhelm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get this merged :)

@jakobmoellerdev jakobmoellerdev enabled auto-merge (squash) February 27, 2026 12:17
@jakobmoellerdev jakobmoellerdev merged commit ef97eee into open-component-model:main Feb 27, 2026
19 checks passed
@morri-son morri-son deleted the enhance-cli-release branch February 27, 2026 12:56
morri-son added a commit that referenced this pull request Mar 11, 2026
On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com>

<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it
This PR improves the existing workflow that builds, tests and publishes
the OCM controller and introduces a new workflow that creates releases
for the controller.

**build workflow:**
- add on workflow_call trigger to be able to call from release workflow
- remove duplicate build in different steps and replace with buidling
just one multi-arch image and extract and reformat single-arch image for
later use in e2e (`kind load`). Since ORAS cannot handle the correct
format, skopeo is used for exactly that purpose. All other steps keep
using ORAS.
- Attestate all published artifacts
- add floating tag "main" on push to main
- Pushes to branches `releases/v*' don't publish images/charts, but only
do E2E tests
- Trigger "workflow_dispatch" that allows to publish/charts if OCI tests
are required

**release workflow:**
- Align with release workflow for cli as much as possible (#1755)
- Call build workflow (build, e2e)
- build and publish docker image only once and promote from RC to final
release
- Repackage and re-attest Helm Chart for Final release
- add floating tags 
  - "latest" for highest release (including pre-releases)
  - "stable" for highest final release

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Introduced a two-phase release process (Release Candidate and Final
Release) with automated tag management, artifact promotion, and
provenance attestation.
* Added OCI image digest support to Helm charts for enhanced image
reference flexibility.
* Implemented automated changelog generation and release notes
publishing.

* **Chores**
* Updated default controller image versions from "latest" to
"0.0.0-main".
* Expanded build and release workflows with multi-stage architecture
including build, testing, publishing, and conformance stages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Co-authored-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
frewilhelm pushed a commit to frewilhelm/open-component-model that referenced this pull request Mar 12, 2026
On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com>

<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it
This PR improves the existing workflow that builds, tests and publishes
the OCM controller and introduces a new workflow that creates releases
for the controller.

**build workflow:**
- add on workflow_call trigger to be able to call from release workflow
- remove duplicate build in different steps and replace with buidling
just one multi-arch image and extract and reformat single-arch image for
later use in e2e (`kind load`). Since ORAS cannot handle the correct
format, skopeo is used for exactly that purpose. All other steps keep
using ORAS.
- Attestate all published artifacts
- add floating tag "main" on push to main
- Pushes to branches `releases/v*' don't publish images/charts, but only
do E2E tests
- Trigger "workflow_dispatch" that allows to publish/charts if OCI tests
are required

**release workflow:**
- Align with release workflow for cli as much as possible (open-component-model#1755)
- Call build workflow (build, e2e)
- build and publish docker image only once and promote from RC to final
release
- Repackage and re-attest Helm Chart for Final release
- add floating tags 
  - "latest" for highest release (including pre-releases)
  - "stable" for highest final release

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Introduced a two-phase release process (Release Candidate and Final
Release) with automated tag management, artifact promotion, and
provenance attestation.
* Added OCI image digest support to Helm charts for enhanced image
reference flexibility.
* Implemented automated changelog generation and release notes
publishing.

* **Chores**
* Updated default controller image versions from "latest" to
"0.0.0-main".
* Expanded build and release workflows with multi-stage architecture
including build, testing, publishing, and conformance stages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Co-authored-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
morri-son added a commit to morri-son/open-component-model that referenced this pull request Mar 18, 2026
On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com>

<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it
This PR improves the existing workflow that builds, tests and publishes
the OCM controller and introduces a new workflow that creates releases
for the controller.

**build workflow:**
- add on workflow_call trigger to be able to call from release workflow
- remove duplicate build in different steps and replace with buidling
just one multi-arch image and extract and reformat single-arch image for
later use in e2e (`kind load`). Since ORAS cannot handle the correct
format, skopeo is used for exactly that purpose. All other steps keep
using ORAS.
- Attestate all published artifacts
- add floating tag "main" on push to main
- Pushes to branches `releases/v*' don't publish images/charts, but only
do E2E tests
- Trigger "workflow_dispatch" that allows to publish/charts if OCI tests
are required

**release workflow:**
- Align with release workflow for cli as much as possible (open-component-model#1755)
- Call build workflow (build, e2e)
- build and publish docker image only once and promote from RC to final
release
- Repackage and re-attest Helm Chart for Final release
- add floating tags
  - "latest" for highest release (including pre-releases)
  - "stable" for highest final release

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Introduced a two-phase release process (Release Candidate and Final
Release) with automated tag management, artifact promotion, and
provenance attestation.
* Added OCI image digest support to Helm charts for enhanced image
reference flexibility.
* Implemented automated changelog generation and release notes
publishing.

* **Chores**
* Updated default controller image versions from "latest" to
"0.0.0-main".
* Expanded build and release workflows with multi-stage architecture
including build, testing, publishing, and conformance stages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Co-authored-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
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/l Large size/m Medium size/xl Extra large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Documentation for new Release process Create GitHub action for release process for CLI

7 participants