Skip to content

feat(ci): overhaul CLI workflow for enhanced artifact generation and publishing#1073

Merged
jakobmoellerdev merged 2 commits into
open-component-model:mainfrom
jakobmoellerdev:cli-build-correction
Oct 23, 2025
Merged

feat(ci): overhaul CLI workflow for enhanced artifact generation and publishing#1073
jakobmoellerdev merged 2 commits into
open-component-model:mainfrom
jakobmoellerdev:cli-build-correction

Conversation

@jakobmoellerdev

@jakobmoellerdev jakobmoellerdev commented Oct 22, 2025

Copy link
Copy Markdown
Member

What this PR does / why we need it:

  • Introduced a revamped cli.yml GitHub Actions workflow to support robust CLI builds and streamlined artifact management: Enhanced support for pull requests, branch-based workflows, release tags, and manual triggers.
  • Modularized the workflow to include two distinct jobs: build and publish.
    • build:
      • Added steps for sparse checkout, Go setup, and artifact generation using CT that references the multi-arch image
      • Implemented provenance attestation for build outputs.
      • Determined branch eligibility for automated artifact publishing.
    • publish:
      • Integrated OCI artifact publishing and tagging.
      • Enabled multi-arch capabilities with layout-derived tagging.
      • Verified and attested pushed OCI images with metadata.
  • Improved artifact clarity with dynamic naming conventions linked to refs.
  • Added manual triggers for enhanced control over rebuilds or retriggers.

Impact

This update introduces a more flexible, multi-arch-compatible workflow, ensuring reliable CLI builds and publishing to align with modern automation standards. It also ensures build and sign workflows by default

Which issue(s) this PR fixes

contributes open-component-model/ocm-project#699

@jakobmoellerdev jakobmoellerdev changed the title feat(ci): overhaul CLI workflow for enhanced artifact generation and … feat(ci): overhaul CLI workflow for enhanced artifact generation and publishing Oct 22, 2025
@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension component/github-actions Changes on GitHub Actions or within `.github/` directory size/m Medium labels Oct 22, 2025
@jakobmoellerdev jakobmoellerdev force-pushed the cli-build-correction branch 3 times, most recently from 9108fca to da1841b Compare October 22, 2025 12:58
…publishing

### What this PR does / why we need it:

- Introduced a revamped `cli.yml` GitHub Actions workflow to support robust CLI builds and streamlined artifact management.
- Enhanced support for pull requests, branch-based workflows, release tags, and manual triggers.
- Modularized the workflow to include two distinct jobs: `build` and `publish`.
  - **`build`**:
    - Added steps for sparse checkout, Go setup, Docker Buildx configuration, and artifact generation using CTF.
    - Implemented provenance attestation for build outputs.
    - Determined branch eligibility for automated artifact publishing.
  - **`publish`**:
    - Integrated OCI artifact publishing and tagging.
    - Enabled multi-arch capabilities with layout-derived tagging.
    - Verified and attested pushed OCI images with metadata.
- Improved artifact clarity with dynamic naming conventions linked to refs.
- Added manual triggers for enhanced control over rebuilds or retriggers.

### Impact

This update introduces a more flexible, multi-arch-compatible workflow, ensuring reliable CLI builds and publishing to align with modern automation standards. It also ensures build and sign workflows by default

Signed-off-by: Jakob Möller <jakob.moeller@sap.com>

@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.

Looks okay. The syntax also looks okay. Can we reasonable run this on a test repo or something?

@matthiasbruns matthiasbruns 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.

lgtm - great job

@jakobmoellerdev

Copy link
Copy Markdown
Member Author

i did run extensive testing on my personal fork, but your mileage will vary. I will adjust if we have problems after that push

@jakobmoellerdev jakobmoellerdev enabled auto-merge (squash) October 23, 2025 13:23
@jakobmoellerdev jakobmoellerdev merged commit b374262 into open-component-model:main Oct 23, 2025
19 of 20 checks passed
jakobmoellerdev added a commit that referenced this pull request Oct 27, 2025
…1075)

<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it

- **Added `release-candidate-version` workflow**:
  - Automates release candidate (RC) version computation and tagging.
  - Generates a changelog using `git-cliff` for the new RC version.
- Outputs relevant metadata like tags, versions, and encoded changelog.

- **Added `cli-release` workflow**:
  - Integrates `release-candidate-version` workflow.
  - Automates tagging, pre-release creation, and CLI builds.
  - Supports dry runs for testing without pushing tags.

- Added necessary infrastructure:
  - Created `cliff.toml` Git-Cliff configuration for changelog styling.
- Added `compute-rc-version.js` script with tests for RC version
computation.

#### Which issue(s) this PR fixes
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->

Enables automated versioning and changelog creation for CLI releases,
aligning with best practices and ensuring consistent workflows.

Establishes an automated release process for streamlined software
delivery and changelog generation.

eventually resolves
open-component-model/ocm-project#699 but
depends on
#1073

---------

Signed-off-by: Jakob Möller <jakob.moeller@sap.com>
Co-authored-by: Gerald Morrison <67469729+morri-son@users.noreply.github.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/feature new feature, enhancement, improvement, extension size/m Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants