Skip to content

chore: cerate prepare-release and release workflow for codegen 3.0#12713

Open
ewaostrowska wants to merge 1 commit into3.0.0from
release-30
Open

chore: cerate prepare-release and release workflow for codegen 3.0#12713
ewaostrowska wants to merge 1 commit into3.0.0from
release-30

Conversation

@ewaostrowska
Copy link
Copy Markdown
Contributor

This PR improves the Swagger Codegen 3.0 release automation by:

  1. Enabling PR creation during dry_run for prepare/release flows.
  2. Removing duplicated embedded Python file-update logic by extracting a shared helper.

Changes

Workflow updates

  • Updated GitHub App token action in new workflows:
    • .github/workflows/prepare-release-3.yml
    • .github/workflows/release-codegen-3.yml

Dry-run PR behavior

  • prepare-release-3.yml
    • PR creation now runs even when dry_run=true.
    • Token generation for PR creation is no longer gated by dry_run.
    • Updated dry_run input description to clarify PR is still created.
  • release-codegen-3.yml
    • post_release_pr now runs even when dry_run=true.
    • Updated dry_run input description to clarify PR is still created.
  • Deploy/publish protections remain unchanged:
    • Maven deploy still gated by skip_maven_deploy and dry_run.
    • Docker push and Rancher deploy still gated and skipped in dry_run.

CI script deduplication

  • Added shared helper:
    • CI/release/update-codegen-release-files.py
  • Refactored:
    • CI/release/prepare-codegen-release.sh
    • CI/release/post-codegen-snapshot.sh
  • Both scripts now call the shared Python helper (prepare / post modes) instead of maintaining duplicated inline Python.

Why

  • Supports safe workflow testing while still producing reviewable PR output.
  • Reduces maintenance risk and drift by centralizing release-file transformation logic.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces the old monolithic Swagger Codegen 3.0 release workflow with separate prepare/release automation plus shared Bash helpers for version resolution and release state handling.

Changes:

  • Adds reusable release helper scripts under CI/release for version checks, prepare-release edits, and post-release snapshot updates.
  • Introduces new prepare-release-3.yml and release-codegen-3.yml workflows to split preparation, validation, publishing, Docker, deployment, and follow-up PR creation.
  • Removes the legacy release-full-3.yml workflow in favor of the new staged flow.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
CI/release/common.sh Adds shared shell helpers for version validation, Maven metadata lookup, artifact existence checks, and workflow outputs.
CI/release/resolve-release-versions.sh Resolves codegen/generators versions and deployment decisions for the new release workflow.
CI/release/prepare-codegen-release.sh Prepares release-version changes, release notes, and release-file updates before opening a PR.
CI/release/post-codegen-snapshot.sh Prepares the next snapshot bump after a release.
.github/workflows/prepare-release-3.yml Adds a manual prepare-release workflow that validates/builds and opens a release PR.
.github/workflows/release-codegen-3.yml Adds the main 3.0 release workflow covering validation, optional generators release, codegen release, Docker, deploy, and post-release PRs.
.github/workflows/release-full-3.yml Removes the previous all-in-one 3.0 release workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CI/release/prepare-codegen-release.sh Outdated
Comment thread CI/release/post-codegen-snapshot.sh Outdated
Comment thread CI/release/resolve-release-versions.sh
Comment thread .github/workflows/release-codegen-3.yml
Comment thread .github/workflows/release-codegen-3.yml
Comment thread .github/workflows/prepare-release-3.yml
Comment thread .github/workflows/prepare-release-3.yml Outdated
Comment thread .github/workflows/release-codegen-3.yml Outdated
Comment thread CI/release/resolve-release-versions.sh Outdated
Comment thread CI/release/resolve-release-versions.sh Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CI/release/prepare-codegen-release.sh Outdated
Comment thread CI/release/post-codegen-snapshot.sh Outdated
Comment thread CI/release/resolve-release-versions.sh Outdated
Comment thread .github/workflows/release-codegen-3.yml
Comment thread .github/workflows/prepare-release-3.yml Outdated
Comment thread .github/workflows/release-codegen-3.yml Outdated
Comment thread .github/workflows/prepare-release-3.yml Outdated
@ewaostrowska ewaostrowska force-pushed the release-30 branch 2 times, most recently from f82def7 to caac496 Compare May 5, 2026 13:24
@ewaostrowska ewaostrowska requested a review from Copilot May 5, 2026 13:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CI/release/update-codegen-release-files.py Outdated
Comment thread CI/release/update-codegen-release-files.py
Comment thread .github/workflows/release-codegen-3.yml
Comment thread .github/workflows/prepare-release-3.yml
Comment thread .github/workflows/release-codegen-3.yml
Comment thread .github/workflows/release-codegen-3.yml
Comment thread CI/release/common.sh
@ewaostrowska ewaostrowska force-pushed the release-30 branch 2 times, most recently from 73986b1 to 4701b8b Compare May 5, 2026 14:07
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.

2 participants