-
Notifications
You must be signed in to change notification settings - Fork 195
39 lines (38 loc) · 1.14 KB
/
bump-versions.yml
File metadata and controls
39 lines (38 loc) · 1.14 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
name: Bump versions
on:
workflow_call:
inputs:
version:
description: The new version
required: true
type: string
workflow_dispatch:
inputs:
version:
description: The new version
required: true
type: string
jobs:
bump-version:
runs-on: sonar-xs-public
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v6
- name: Update version in pom.xml
env:
VERSION: ${{ inputs.version }}
run: |
snapshot_version="${VERSION}-SNAPSHOT"
# Update the revision property in root pom.xml to the new snapshot version
sed -i "s/<revision>.*-SNAPSHOT<\/revision>/<revision>${snapshot_version}<\/revision>/" pom.xml
- uses: peter-evans/create-pull-request@v8
with:
author: ${{ github.actor }} <${{ github.actor }}>
commit-message: Prepare next development iteration
title: Prepare next development iteration
branch: bot/bump-project-version
branch-suffix: timestamp
base: master
reviewers: ${{ github.actor }}