@@ -3,12 +3,21 @@ name: Hibernate Reactive CI
33on :
44 push :
55 branches :
6- - main
6+ - ' main'
7+ - ' wip/**'
78 tags :
89 - ' 2.*'
910 pull_request :
1011 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 :
1221
1322# See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting.
1423concurrency :
@@ -219,6 +228,29 @@ jobs:
219228 name : reports-java${{ matrix.java.name }}
220229 path : ' ./**/build/reports/'
221230
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+ uses : actions/setup-java@v2.2.0
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+
222254 release :
223255 name : Release
224256 if : github.event_name == 'push' && startsWith( github.ref, 'refs/tags/' )
0 commit comments