Skip to content

Commit f097a7a

Browse files
committed
Prepare for release
1 parent 0596ca6 commit f097a7a

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
run: |
6262
mvnwPath=$(readlink -f ./mvnw)
6363
modules=("") # root
64-
modules+=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0'))
64+
modules+=($(grep -oP '(?<=<module>)[^<]+' 'pom.xml'))
6565
for i in "${modules[@]}"
6666
do
6767
echo "Processing $i/pom.xml"
@@ -119,7 +119,7 @@ jobs:
119119
git config --global user.name "GitHub Actions"
120120
git pull
121121
122-
- name: Set up JDK Apache Maven Central
122+
- name: Set up JDK
123123
uses: actions/setup-java@v4
124124
with: # running setup-java again overwrites the settings.xml
125125
java-version: '17'
@@ -130,8 +130,14 @@ jobs:
130130
gpg-passphrase: MAVEN_GPG_PASSPHRASE
131131
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
132132

133-
- name: Publish to Apache Maven Central
134-
run: ./mvnw -B deploy -pl "codec-sha256,csp,web-sidebar-actuator,web-sidecar-common" -am -Possrh -DskipTests
133+
- name: Publish
134+
run: |
135+
modules=("bom")
136+
dependency_management_block=$(grep -ozP '<dependencyManagement>(\r|\n|.)*<\/dependencyManagement>' 'bom/pom.xml' | tr -d '\0')
137+
modules+=($(echo $dependency_management_block | grep -oP '(?<=<artifactId>)[^<]+'))
138+
printf -v modules_joined '%s,' "${modules[@]}"
139+
modules_arg=$(echo "${modules_joined%,}")
140+
./mvnw -B deploy -pl "$modules_arg" -am -T2C -Possrh -DskipTests
135141
env:
136142
MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }}
137143
MAVEN_CENTRAL_TOKEN: ${{ secrets.S01_OSS_SONATYPE_MAVEN_TOKEN }}

.github/workflows/test-deploy.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ jobs:
2222
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2323

2424
- name: Publish to OSSRH
25-
run: ./mvnw -B deploy -pl "codec-sha256,csp,web-sidebar-actuator,web-sidecar-common" -am -Possrh -DskipTests
25+
run: |
26+
modules=("bom")
27+
dependency_management_block=$(grep -ozP '<dependencyManagement>(\r|\n|.)*<\/dependencyManagement>' 'bom/pom.xml' | tr -d '\0')
28+
modules+=($(echo $dependency_management_block | grep -oP '(?<=<artifactId>)[^<]+'))
29+
printf -v modules_joined '%s,' "${modules[@]}"
30+
modules_arg=$(echo "${modules_joined%,}")
31+
./mvnw -B deploy -pl "$modules_arg" -am -T2C -Possrh -DskipTests
2632
env:
2733
MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }}
2834
MAVEN_CENTRAL_TOKEN: ${{ secrets.S01_OSS_SONATYPE_MAVEN_TOKEN }}

0 commit comments

Comments
 (0)