25
25
cache : ' maven'
26
26
27
27
- name : Build with Maven
28
- run : mvn -B clean package
28
+ run : ./mvnw -B clean package
29
29
30
30
- name : Check for uncommited changes
31
31
run : |
41
41
echo ----------------------------------------
42
42
echo Troubleshooting
43
43
echo ----------------------------------------
44
- echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && mvn -B clean package"
44
+ echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package"
45
45
exit 1
46
46
fi
47
47
@@ -60,18 +60,19 @@ jobs:
60
60
61
61
- name : Un-SNAP
62
62
run : |
63
+ mvnwPath=$(readlink -f ./mvnw)
63
64
modules=("") # root
64
65
modules+=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0'))
65
66
for i in "${modules[@]}"
66
67
do
67
68
echo "Processing $i/pom.xml"
68
- (cd "$i" && mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false)
69
+ (cd "$i" && $mvnwPath -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false)
69
70
done
70
71
71
72
- name : Get version
72
73
id : version
73
74
run : |
74
- version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
75
+ version=$(../mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
75
76
echo "release=$version" >> $GITHUB_OUTPUT
76
77
echo "releasenumber=${version//[!0-9]/}" >> $GITHUB_OUTPUT
77
78
working-directory : ${{ env.PRIMARY_MAVEN_MODULE }}
@@ -129,15 +130,14 @@ jobs:
129
130
gpg-private-key : ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
130
131
131
132
- name : Publish to Apache Maven Central
132
- run : mvn -B deploy -Possrh
133
+ run : ../mvnw -B deploy -Possrh
133
134
env :
134
135
MAVEN_CENTRAL_USERNAME : ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }}
135
136
MAVEN_CENTRAL_TOKEN : ${{ secrets.S01_OSS_SONATYPE_MAVEN_TOKEN }}
136
137
MAVEN_GPG_PASSPHRASE : ${{ secrets.MAVEN_GPG_PASSPHRASE }}
137
138
working-directory : ${{ env.PRIMARY_MAVEN_MODULE }}
138
139
139
140
publish-pages :
140
- name : Publish dependencies and licenses to github pages
141
141
runs-on : ubuntu-latest
142
142
needs : [prepare_release]
143
143
steps :
@@ -156,40 +156,15 @@ jobs:
156
156
distribution : ' temurin'
157
157
cache : ' maven'
158
158
159
- - name : Build dependencies/licenses files
160
- run : mvn -B project-info-reports:dependencies
159
+ - name : Build site
160
+ run : ../mvnw -B site
161
161
working-directory : ${{ env.PRIMARY_MAVEN_MODULE }}
162
162
163
- - name : Upload licenses - Upload Artifact
164
- uses : actions/upload-artifact@v4
165
- with :
166
- name : dependencies-licenses
167
- path : ${{ env.PRIMARY_MAVEN_MODULE }}/target/site
168
-
169
- - name : Generate docs/dependencies dir
170
- run : mkdir -p docs/dependencies
171
-
172
- - name : Move built files into docs/dependencies
173
- run : mv ${{ env.PRIMARY_MAVEN_MODULE }}/target/site/* docs/dependencies
174
-
175
- - name : Rename dependencies.html to index.html
176
- working-directory : docs/dependencies
177
- run : mv dependencies.html index.html
178
-
179
- - name : Copy Readme into docs (as index.md)
180
- run : cp README.md docs/index.md
181
-
182
- - name : Configure Pages
183
- working-directory : docs
184
- run : |-
185
- echo "theme: jekyll-theme-tactile" > _config.yml
186
-
187
163
- name : Deploy to Github pages
188
- uses : peaceiris/actions-gh-pages@v3
164
+ uses : peaceiris/actions-gh-pages@v4
189
165
with :
190
166
github_token : ${{ secrets.GITHUB_TOKEN }}
191
- publish_dir : ./docs
192
- enable_jekyll : true
167
+ publish_dir : ./${{ env.PRIMARY_MAVEN_MODULE }}/target/site
193
168
194
169
after_release :
195
170
runs-on : ubuntu-latest
@@ -205,12 +180,13 @@ jobs:
205
180
206
181
- name : Inc Version and SNAP
207
182
run : |
183
+ mvnwPath=$(readlink -f ./mvnw)
208
184
modules=("") # root
209
185
modules+=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0'))
210
186
for i in "${modules[@]}"
211
187
do
212
188
echo "Processing $i/pom.xml"
213
- (cd "$i" && mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true)
189
+ (cd "$i" && $mvnwPath -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true)
214
190
done
215
191
216
192
- name : Git Commit and Push
0 commit comments