ci(release): add job to bump next version after release#138
ci(release): add job to bump next version after release#138feloy merged 2 commits intokortex-hub:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughAdds a new Changes
Sequence Diagram(s)sequenceDiagram
participant Workflow as GitHub Actions (bump-next-version)
participant Git as Git CLI
participant SVU as svu
participant FS as repo (pkg/version/version.go)
participant GH as GitHub API (gh)
Workflow->>Git: checkout main
Workflow->>SVU: run svu next
SVU-->>Workflow: NEXT_VERSION
Workflow->>FS: sed replace Version -> NEXT_VERSION-next
Workflow->>Git: git checkout -b bump/version-NEXT
Workflow->>Git: git add & commit & push
Workflow->>GH: gh pr create (target: main, token: KORTEX_BOT_TOKEN)
GH-->>Workflow: PR created
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/release.yml:
- Around line 79-93: In the "Create PR" step where BRANCH is created and
pkg/version/version.go is added/committed, guard the commit so the job skips
committing when the sed replacement made no changes: after git add
pkg/version/version.go (in the Create PR block) run a check like inspecting git
status/porcelain or using git diff --cached --quiet and only run git commit -m
"chore: bump version to ${{ steps.version.outputs.next_version }}" if there are
staged changes; if no changes exist, skip the commit/PR creation to avoid
failing the workflow when the file is already current.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e1c4d24d-417c-497a-a71e-70af327ba532
📒 Files selected for processing (1)
.github/workflows/release.yml
.github/workflows/release.yml
Outdated
| --base main \ | ||
| --head "$BRANCH" | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
I think it should be KORTEX_BOT_TOKEN
After a release tag is pushed, a new bump-next-version job computes the next semantic version via svu, updates pkg/version/version.go with a -next suffix, and opens a PR targeting main. Workflow-level permissions moved to per-job for least privilege. Closes kortex-hub#123 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Philippe Martin <phmartin@redhat.com>
Signed-off-by: Philippe Martin <phmartin@redhat.com>
After a release tag is pushed, a new bump-next-version job computes the next semantic version via svu, updates pkg/version/version.go with a -next suffix, and opens a PR targeting main.
Workflow-level permissions moved to per-job for least privilege.
Closes #123