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 :
10
+ - ' wip/2.3'
11
+ schedule :
12
+ # * is a special character in YAML, so you have to quote this string
13
+ # Run every hour at minute 25
14
+ - cron : ' 25 * * * *'
15
+ # Allow running this workflow against a specific branch/tag
16
+ workflow_dispatch :
11
17
12
18
# See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting.
13
19
concurrency :
85
91
with :
86
92
distribution : ' temurin'
87
93
java-version : 11
94
+ - name : Print the effective ORM version used
95
+ run : ./gradlew :${{ matrix.example }}:dependencyInsight --dependency org.hibernate.orm:hibernate-core
88
96
- name : Run examples in '${{ matrix.example }}' on ${{ matrix.db }}
89
97
run : ./gradlew :${{ matrix.example }}:runAllExamplesOn${{ matrix.db }}
90
98
- name : Upload reports (if build failed)
@@ -122,6 +130,8 @@ jobs:
122
130
with :
123
131
distribution : ' temurin'
124
132
java-version : 11
133
+ - name : Print the effective ORM version used
134
+ run : ./gradlew :hibernate-reactive-core:dependencyInsight --dependency org.hibernate.orm:hibernate-core
125
135
- name : Build and Test with ${{ matrix.db }}
126
136
run : ./gradlew build -PshowStandardOutput -Pdocker -Pdb=${{ matrix.db }}
127
137
- name : Upload reports (if build failed)
@@ -200,6 +210,8 @@ jobs:
200
210
- name : Display exact version of JDK ${{ matrix.java.name }}
201
211
run : |
202
212
${{ steps.testjdk-exportpath.outputs.path }}/bin/java -version
213
+ - name : Print the effective ORM version used
214
+ run : ./gradlew :hibernate-reactive-core:dependencyInsight --dependency org.hibernate.orm:hibernate-core
203
215
- name : Build and Test with Java ${{ matrix.java.name }}
204
216
run : |
205
217
./gradlew build -PshowStandardOutput -Pdocker -Ptest.jdk.version=${{ matrix.java.java_version_numeric }} \
@@ -212,37 +224,25 @@ jobs:
212
224
name : reports-java${{ matrix.java.name }}
213
225
path : ' ./**/build/reports/'
214
226
215
- release :
216
- name : Release
217
- if : github.event_name == 'push' && startsWith( github.ref, 'refs/tags /' )
227
+ snapshot :
228
+ name : Create snapshot
229
+ if : github.event_name == 'push' && startsWith( github.ref, 'refs/heads /' )
218
230
runs-on : ubuntu-latest
219
231
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
232
+ - uses : actions/checkout@v2
233
+ - name : Set up JDK 11
234
+
235
+ with :
236
+ distribution : ' temurin'
237
+ java-version : 11
238
+ - name : Create artifacts
239
+ run : ./gradlew assemble
240
+ - name : Detect the version of Hibernate Reactive
241
+ id : detect-version
242
+ run : |
243
+ sed -E 's/^projectVersion( *= *| +)([^ ]+)/::set-output name=version::\2/g' gradle/version.properties
244
+ - name : Publish snapshots 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
0 commit comments