Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/automated-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ on:
required: false
type: boolean
default: false
bump-version-normalize:
description: "If true, the version will have full major.minor.patch format, otherwise the final .0 is dropped."
required: false
type: boolean
default: false
bump-version-pr-lables:
description: "Labels to apply to the version bump pull request if bump-version is true. For example, 'update-next-dev,skip-qa'."
required: false
Expand Down Expand Up @@ -482,10 +487,25 @@ jobs:
contents: write
pull-requests: write
steps:
# Convert the version returned by release-in-jira to the full "major.minor.patch" format
# (it drops the patch if it is 0).
- name: Normalize Version
id: normalize
if: ${{ inputs.bump-version-normalize }}
shell: bash
run: |
INPUT="${{ needs.release-in-jira.outputs.new-version }}"
if [[ $INPUT =~ ^[0-9]+\.[0-9]+$ ]]; then
OUTPUT="${INPUT}.0"
else
OUTPUT="$INPUT"
fi
echo "version=${OUTPUT}" >> "$GITHUB_OUTPUT"

- name: Bump version and create PR
uses: SonarSource/release-github-actions/bump-version@v1
with:
version: ${{ needs.release-in-jira.outputs.new-version }}
version: ${{ steps.normalize.outputs.version || needs.release-in-jira.outputs.new-version }}
pr-labels: ${{ inputs.bump-version-pr-lables }}
excluded-modules: ${{ inputs.bump-version-exlusions }}
base-branch: ${{ inputs.branch }}
Expand Down