Skip to content

GHA-156 Add Bump Project Version Action to update version in Maven and Gradle files#95

Merged
nils-werner-sonarsource merged 9 commits intomasterfrom
nw/create-bump-version-action
Feb 20, 2026
Merged

GHA-156 Add Bump Project Version Action to update version in Maven and Gradle files#95
nils-werner-sonarsource merged 9 commits intomasterfrom
nw/create-bump-version-action

Conversation

@nils-werner-sonarsource
Copy link
Contributor

@nils-werner-sonarsource nils-werner-sonarsource commented Feb 19, 2026

Summary

  • Add a new bump-version composite action that updates version in Maven (pom.xml) and Gradle (gradle.properties) files
  • Supports excluding specific modules, configurable base branch, PR labels, and an optional GitHub token input
  • Uses the in-house create-pull-request action instead of peter-evans/create-pull-request
  • Includes unit tests and a test workflow

Test plan

  • Run the test-bump-version workflow to verify the bump script works correctly
  • Test PR creation end-to-end by triggering the action in a test repository
  • Verify the pull-request-url output is correctly populated

Test Results

Created PR: https://github.com/SonarSource/sonar-rpg/pull/343
Use of Action: https://github.com/SonarSource/sonar-rpg/pull/342/changes
(need to be updated after this action is released)

Caution

This will not work before the next v1 release as we are depending on the create-pull-request action which will be added in v1

🤖 Generated with Claude Code

@nils-werner-sonarsource nils-werner-sonarsource changed the title Add bump-version composite action GHA-156 Add Bump Project Version Action to update version in Maven and Gradle files Feb 19, 2026
@nils-werner-sonarsource nils-werner-sonarsource force-pushed the nw/create-bump-version-action branch from 96143d8 to 61a1bcd Compare February 20, 2026 09:29
@sonarqubecloud
Copy link

SonarQube reviewer guide

Review in SonarQube

Summary: Introduces a new "Bump Project Version" GitHub Action that automates version updates in Maven and Gradle files with module exclusion support.

Review Focus: Pay close attention to the version bumping logic in bump_version.sh, particularly the sed patterns for updating pom.xml and gradle.properties files, and the module exclusion mechanism using find with dynamic -not -path arguments. Verify the whitespace trimming logic handles edge cases correctly. Additionally, review the test coverage in test_bump_version.sh to ensure all scenarios are adequately validated.

Start review at: bump-version/bump_version.sh. This is the core implementation that performs the critical file modifications. The sed patterns and exclusion logic directly impact version updates across the repository, making correctness essential before the action is used in production workflows.

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

Copy link

Choose a reason for hiding this comment

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

LGTM. Just a question/concern regarding env.TITLE_MESSAGE usage.

@nils-werner-sonarsource nils-werner-sonarsource merged commit 12cd128 into master Feb 20, 2026
8 checks passed
@nils-werner-sonarsource nils-werner-sonarsource deleted the nw/create-bump-version-action branch February 20, 2026 13:23
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