-
Notifications
You must be signed in to change notification settings - Fork 724
53 lines (44 loc) · 1.61 KB
/
PrepareNextIteration.yml
File metadata and controls
53 lines (44 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Prepare Next Development Iteration
on:
workflow_dispatch:
inputs:
version:
description: The new version (without -SNAPSHOT)
required: true
jobs:
Next-Iteration-Job:
name: Next Iteration Job
runs-on: sonar-xs-public
permissions:
pull-requests: write
contents: write
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3.6.3
with:
version: 2025.7.12
- name: Normalize Version
id: version
env:
VERSION: ${{ inputs.version }}
run: |
if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+$ ]]; then
VERSION="${VERSION}.0"
fi
echo "full-version=${VERSION}-SNAPSHOT" >> $GITHUB_OUTPUT
- name: Update Version Number
run: |
mvn versions:set -DgenerateBackupPoms=false -DnewVersion="${{ steps.version.outputs.full-version }}"
- name: Create Pull Request
uses: SonarSource/release-github-actions/create-pull-request@v1
id: create-pr
with:
commit-message: "Prepare next development iteration ${{ steps.version.outputs.full-version }}"
title: "Prepare next development iteration ${{ steps.version.outputs.full-version }}"
branch: gh-action/next-iteration
branch-suffix: timestamp
- name: Summary
run: |
echo "Generated ${{steps.create-pr.outputs.pull-request-url}}." >> $GITHUB_STEP_SUMMARY
echo "New version set to ${{ steps.version.outputs.full-version }}." >> $GITHUB_STEP_SUMMARY