This action updates the version in Maven and Gradle files across your repository. It supports excluding specific modules from the version bump.
| Name | Description | Required | Default |
|---|---|---|---|
| version | The new version (without -SNAPSHOT) |
Yes | |
| token | The GitHub token for PR creation | No | |
| excluded-modules | Comma-separated list of modules to exclude from version bumping | No | |
| base-branch | The base branch for the pull request | No | master |
| pr-labels | Comma-separated list of labels to add to the pull request | No | |
| tool | Version bumping tool to use. Supported values: maven. Leave empty to use the default shell-based solution. |
No |
| Name | Description |
|---|---|
| pull-request-url | URL of the created pull request |
- name: Bump version
id: bump
uses: SonarSource/release-github-actions/bump-version@v1
with:
version: '1.2.3'
token: ${{ secrets.GITHUB_TOKEN }}
excluded-modules: 'moduleA,moduleB'
- name: Show PR URL
run: echo "PR URL: ${{ steps.bump.outputs.pull-request-url }}"- If
toolis set tomaven, runsmvn versions:setto update the version. - Otherwise, updates all
pom.xmlandgradle.propertiesfiles to the new version, skipping modules listed inexcluded-modules. - Commits changes and creates a pull request.