Skip to content

Commit e1a90ad

Browse files
committed
chore: adds update-spring-modulith-parent-pom-2x.yml for 2.x.x releases in branch next/spring-boot-4
1 parent c43b06e commit e1a90ad

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Update Spring-Modulith Parent POM Version 2.x
2+
3+
on:
4+
schedule:
5+
- cron: '0 1 * * *' # Runs daily at 1 AM (1 hour after the 1.4.x workflow)
6+
workflow_dispatch:
7+
8+
jobs:
9+
update-parent-pom-2x:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
with:
16+
ref: next/spring-boot-4
17+
18+
- name: Set up Java
19+
uses: actions/setup-java@v3
20+
with:
21+
distribution: 'temurin'
22+
java-version: '17'
23+
24+
- name: Cache Maven packages
25+
uses: actions/cache@v3
26+
with:
27+
path: ~/.m2
28+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
29+
restore-keys: |
30+
${{ runner.os }}-maven-
31+
32+
- name: Update parent POM version to 2.x
33+
id: update-parent-pom
34+
run: |
35+
NEW_VERSION=$(curl -s "https://repo1.maven.org/maven2/org/springframework/modulith/spring-modulith-events/maven-metadata.xml" | grep -oP '<version>2\.[0-9]+\.[0-9]+(-[A-Z0-9]+)?</version>' | grep -oP '2\.[0-9]+\.[0-9]+(-[A-Z0-9]+)?' | sort -V | tail -1)
36+
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT
37+
mvn versions:update-parent -DparentVersion=${NEW_VERSION} -DskipResolution=true -DgenerateBackupPoms=false
38+
39+
- name: Build with new parent version
40+
run: mvn clean verify -B
41+
42+
- name: Create Pull Request
43+
uses: peter-evans/create-pull-request@v5
44+
with:
45+
commit-message: 'Update Spring-Modulith Parent POM version to ${{ steps.update-parent-pom.outputs.NEW_VERSION }}'
46+
branch: update-parent-pom-2x-${{ steps.update-parent-pom.outputs.NEW_VERSION }}
47+
title: 'Update Spring-Modulith Parent POM version to ${{ steps.update-parent-pom.outputs.NEW_VERSION }}'
48+
body: 'This PR updates Spring-Modulith Parent POM version to ${{ steps.update-parent-pom.outputs.NEW_VERSION }} for Spring Boot 4 compatibility'
49+
labels: 'dependencies'
50+
base: next/spring-boot-4

0 commit comments

Comments
 (0)