@@ -3,12 +3,21 @@ name: Hibernate Reactive CI
3
3
on :
4
4
push :
5
5
branches :
6
- - main
6
+ - ' main'
7
+ - ' wip/**'
7
8
tags :
8
9
- ' 2.*'
9
10
pull_request :
10
11
branches :
11
- - main
12
+ - ' main'
13
+ - ' wip/**'
14
+ # We run the build every hour to check for changes in the snapshots
15
+ schedule :
16
+ # * is a special character in YAML, so you have to quote this string
17
+ # Run every hour at minute 25
18
+ - cron : ' 25 * * * *'
19
+ # Allow running this workflow against a specific branch/tag
20
+ workflow_dispatch :
12
21
13
22
# See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting.
14
23
concurrency :
@@ -219,6 +228,29 @@ jobs:
219
228
name : reports-java${{ matrix.java.name }}
220
229
path : ' ./**/build/reports/'
221
230
231
+ snapshot :
232
+ name : Release snapshot
233
+ if : github.event_name == 'push' && startsWith( github.ref, 'refs/heads/wip/' )
234
+ runs-on : ubuntu-latest
235
+ steps :
236
+ - uses : actions/checkout@v2
237
+ - name : Set up JDK 11
238
+
239
+ with :
240
+ distribution : ' temurin'
241
+ java-version : 11
242
+ - name : Create artifacts
243
+ run : ./gradlew assemble
244
+ - name : Detect the version of Hibernate Reactive
245
+ id : detect-version
246
+ run : |
247
+ sed -E 's/^projectVersion( *= *| +)([^ ]+)/::set-output name=version::\2/g' gradle/version.properties
248
+ - name : Publish snapshots to OSSRH, close repository and release
249
+ env :
250
+ ORG_GRADLE_PROJECT_sonatypeOssrhUser : ${{ secrets.SONATYPE_OSSRH_USER }}
251
+ ORG_GRADLE_PROJECT_sonatypeOssrhPassword : ${{ secrets.SONATYPE_OSSRH_PASSWORD }}
252
+ run : ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
253
+
222
254
release :
223
255
name : Release
224
256
if : github.event_name == 'push' && startsWith( github.ref, 'refs/tags/' )
0 commit comments