1
+ # GitHub actions for branch testing the latest Hibernate ORM 6.5 snapshot
1
2
name : Hibernate Reactive CI
2
3
3
4
on :
4
5
push :
5
6
branches :
6
- - main
7
- tags :
8
- - ' 2.*'
7
+ - wip/2.3
9
8
pull_request :
10
- branches : main
9
+ branches : wip/2.3
10
+ schedule :
11
+ # * is a special character in YAML, so you have to quote this string
12
+ # Run every hour at minute 25
13
+ - cron : ' 25 * * * *'
14
+ # Allow running this workflow against a specific branch/tag
15
+ workflow_dispatch :
11
16
12
17
# See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting.
13
18
concurrency :
85
90
with :
86
91
distribution : ' temurin'
87
92
java-version : 11
93
+ - name : Print the effective ORM version used
94
+ run : ./gradlew :${{ matrix.example }}:dependencyInsight --dependency org.hibernate.orm:hibernate-core
88
95
- name : Run examples in '${{ matrix.example }}' on ${{ matrix.db }}
89
96
run : ./gradlew :${{ matrix.example }}:runAllExamplesOn${{ matrix.db }}
90
97
- name : Upload reports (if build failed)
@@ -122,6 +129,8 @@ jobs:
122
129
with :
123
130
distribution : ' temurin'
124
131
java-version : 11
132
+ - name : Print the effective ORM version used
133
+ run : ./gradlew :hibernate-reactive-core:dependencyInsight --dependency org.hibernate.orm:hibernate-core
125
134
- name : Build and Test with ${{ matrix.db }}
126
135
run : ./gradlew build -PshowStandardOutput -Pdocker -Pdb=${{ matrix.db }}
127
136
- name : Upload reports (if build failed)
@@ -200,6 +209,8 @@ jobs:
200
209
- name : Display exact version of JDK ${{ matrix.java.name }}
201
210
run : |
202
211
${{ steps.testjdk-exportpath.outputs.path }}/bin/java -version
212
+ - name : Print the effective ORM version used
213
+ run : ./gradlew :hibernate-reactive-core:dependencyInsight --dependency org.hibernate.orm:hibernate-core
203
214
- name : Build and Test with Java ${{ matrix.java.name }}
204
215
run : |
205
216
./gradlew build -PshowStandardOutput -Pdocker -Ptest.jdk.version=${{ matrix.java.java_version_numeric }} \
@@ -212,37 +223,25 @@ jobs:
212
223
name : reports-java${{ matrix.java.name }}
213
224
path : ' ./**/build/reports/'
214
225
215
- release :
216
- name : Release
217
- if : github.event_name == 'push' && startsWith( github.ref, 'refs/tags /' )
226
+ snapshot :
227
+ name : Create snapshot
228
+ if : github.event_name == 'push' && startsWith( github.ref, 'refs/heads /' )
218
229
runs-on : ubuntu-latest
219
230
steps :
220
- - uses : actions/checkout@v2
221
- - name : Set git username and email
222
- run : |
223
- git config --global user.email "[email protected] "
224
- git config --global user.name "hibernate"
225
- - name : Set up JDK 11
226
-
227
- with :
228
- distribution : ' temurin'
229
- java-version : 11
230
- - name : Create artifacts
231
- run : ./gradlew assemble
232
- - name : Install SSH key
233
- uses : shimataro/ssh-key-action@v2
234
- with :
235
- key : ${{ secrets.HIBERNATE_ORG_SSH_KEY }}
236
- name : id_rsa_hibernate.org
237
- known_hosts : ${{ secrets.HIBERNATE_ORG_SSH_KNOWN_HOSTS }}
238
- config : |
239
- Host github.com
240
- User hibernate
241
- IdentityFile ~/.ssh/id_rsa_hibernate.org
242
- - name : Publish documentation on Hibernate.org
243
- run : ./gradlew publishDocumentation -PdocPublishBranch=production
244
- - name : Publish artifacts to OSSRH, close repository and release
245
- env :
246
- ORG_GRADLE_PROJECT_sonatypeOssrhUser : ${{ secrets.SONATYPE_OSSRH_USER }}
247
- ORG_GRADLE_PROJECT_sonatypeOssrhPassword : ${{ secrets.SONATYPE_OSSRH_PASSWORD }}
248
- run : ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
231
+ - uses : actions/checkout@v2
232
+ - name : Set up JDK 11
233
+
234
+ with :
235
+ distribution : ' temurin'
236
+ java-version : 11
237
+ - name : Create artifacts
238
+ run : ./gradlew assemble
239
+ - name : Detect the version of Hibernate Reactive
240
+ id : detect-version
241
+ run : |
242
+ sed -E 's/^projectVersion( *= *| +)([^ ]+)/::set-output name=version::\2/g' gradle/version.properties
243
+ - name : Publish snapshots to OSSRH, close repository and release
244
+ env :
245
+ ORG_GRADLE_PROJECT_sonatypeOssrhUser : ${{ secrets.SONATYPE_OSSRH_USER }}
246
+ ORG_GRADLE_PROJECT_sonatypeOssrhPassword : ${{ secrets.SONATYPE_OSSRH_PASSWORD }}
247
+ run : ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
0 commit comments