Skip to content

[IGNORE]: automate release preparation#382

Open
vprashar2929 wants to merge 1 commit intoperses:mainfrom
vprashar2929:ci-release-auto
Open

[IGNORE]: automate release preparation#382
vprashar2929 wants to merge 1 commit intoperses:mainfrom
vprashar2929:ci-release-auto

Conversation

@vprashar2929
Copy link
Copy Markdown
Contributor

@vprashar2929 vprashar2929 commented Apr 19, 2026

Description

This commit adds a .github/workflows/release.yaml workflow that prepares a release by:

  • Writing a new version to VERSION file
  • Running make bundle VERSION_REPLACED=<prev> to regenerate the OLM bundle with the correct spec.replaces chain
  • Running make build-installer to regenerate the bundle.yaml
  • Opening a PR against main with the changes

The commit also updates the existing RELEASE.md with the new flow

Closes: #ISSUE-NUMBER

Type of change

  • FEATURE (non-breaking change which adds functionality)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • BREAKINGCHANGE (fix or feature that would cause existing functionality to not work as expected)
  • DOC (documentation only)
  • IGNORE (tooling, build system, CI, etc.)

Verification

  • Unit tests added/updated
  • Integration tests added/updated
  • E2E tests added/updated
  • Manual testing performed

Checklist

  • Pull request has a descriptive title and context useful to a reviewer
  • Code follows project conventions and passes linting
  • All commits have DCO signoffs

@vprashar2929
Copy link
Copy Markdown
Contributor Author

CI run for ref: vprashar2929#1

Comment thread RELEASE.md Outdated
(`spec.version`, `spec.replaces`)
- CRDs and jsonnet generated files (if CRDs changed)
- `bundle.yaml` (root installer manifest)
- If CHANGELOG updates are needed, run `make generate-changelog` locally and
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jgbernalp @slashpai The current workflow doesn't run make generate-changelog Just want to confirm should we include it as part of the workflow in which workflow runs make generate-changelog and then we edit the PR to cleanup UNKNOWN entries before we merge it or do we want to do it manually after the PR is merged to main?

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.

I think it makes sense to let the workflow generate the changelog and clean it up in the PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed, I will make the change and we can review the changelog in the release PR.

@vprashar2929 vprashar2929 marked this pull request as ready for review April 20, 2026 05:02
@vprashar2929 vprashar2929 requested a review from a team as a code owner April 20, 2026 05:02
@jgbernalp
Copy link
Copy Markdown
Contributor

Just to confirm, we are changing the flow so we don't have to create a release/vX.Y branch and we just review the PR as all the generation, changelog and tag can be done from the CI. Is that correct?

@vprashar2929 vprashar2929 force-pushed the ci-release-auto branch 2 times, most recently from 6ce7c46 to 694f520 Compare April 21, 2026 07:18
@vprashar2929
Copy link
Copy Markdown
Contributor Author

Just to confirm, we are changing the flow so we don't have to create a release/vX.Y branch and we just review the PR as all the generation, changelog and tag can be done from the CI. Is that correct?

Correct so we no longer need to create a release/vX.Y branch for release preparation. The release workflow handles updating the VERSION, generating changelog, generating bundle and installer manifests and opens a PR against main branch which we review and update/clean any UNKNOWN changelog entries before we merge.

Currently I didn't automate tag creation so that is done manually. Would you prefer keeping it manual or should we automate that as well?

inputs:
tag:
description: "New version to release, e.g. 0.4.0 (no 'v' prefix)"
required: true
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.

can we add validation on these format to avoid errors?

Comment thread .github/workflows/release.yaml Outdated
permissions:
contents: write
pull-requests: write
steps:
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.

Suggested change
steps:
concurrency:
group: release-preparation
cancel-in-progress: true
steps:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice one!

- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
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.

does the changelog depend on having the commits?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes I think we need it

Comment thread .github/workflows/release.yaml Outdated
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why we need this permission? its an elevated permission IIUC

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice catch! 🙇 yes we don't need them. Pushed the change for that

This commit adds a `.github/workflows/release.yaml` workflow that
prepares a release by:

- Writing a new version to `VERSION` file
- Running `make bundle VERSION_REPLACED=<prev>` to regenerate the OLM bundle
  with the correct `spec.replaces` chain
- Running `make build-installer` to regenerate the `bundle.yaml`
- Opening a PR against `main` with the changes

The commit also updates the existing `RELEASE.md` with the new flow

Signed-off-by: vprashar2929 <vibhu.sharma2929@gmail.com>
Comment thread RELEASE.md
@@ -1,83 +1,127 @@
# Perses Operator Release

## 1. Prepare your release
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need to remove all these steps? These are independent of operator hub, I think like helm chart section we should have a section for operatorhub instead

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes these are all handled by the workflow now

@slashpai
Copy link
Copy Markdown
Member

slashpai commented Apr 29, 2026

ok I realized this is different PR :)

Also a couple of questions:

  • For changelog update we need to verify if pr numbers are correct and skip unknown types. We use the script currently and release shepherd reviews it manually and corrects if needed. So if a PR is created by bot again we will need to update if issues IIUC.

  • curious to know if you have tested this in fork

@vprashar2929
Copy link
Copy Markdown
Contributor Author

  • For changelog update we need to verify if pr numbers are correct and skip unknown types. We use the script currently and release shepherd reviews it manually and corrects if needed. So if a PR is created by bot again we will need to update if issues IIUC.

The workflow just runs make generate-changelog as how we do currently in other workflow. Once the PR is created we need to review the generated changelog and then push the corrected change back to the generated PR: https://github.com/perses/perses-operator/pull/382/changes#diff-2b1b69303b927a484e02c7fad9fc87d0d3ff0dc22ae1da0ecd0dc935d922a23cR62

@vprashar2929
Copy link
Copy Markdown
Contributor Author

curious to know if you have tested this in fork

Yep I tested on my fork. Here is the workflow run: https://github.com/vprashar2929/perses-operator/actions/runs/24709425948 along with PR generated: vprashar2929#1
That PR has the full output:

  • VERSION bumped to 0.3.3
  • Changelog generated (CHANGELOG.md) and ready for UNKNOWN cleanup in PR review
  • Bundle generated with VERSION_REPLACED=0.3.2 (OLM replaces: perses-operator.v0.3.2)
  • Installer manifest bundle.yaml generated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants