Skip to content

Commit 0944550

Browse files
committed
Enable builds with the latest Hibernate ORM 7.0 snapshots
1 parent 33b4096 commit 0944550

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# GitHub actions for branch testing the latest Hibernate ORM 7.0 snapshot
12
name: Hibernate Reactive CI
23

34
on:
@@ -22,6 +23,7 @@ jobs:
2223
runs-on: ubuntu-latest
2324
strategy:
2425
matrix:
26+
orm-version: [ '7.0.0-SNAPSHOT' ]
2527
example: [ 'session-example', 'native-sql-example' ]
2628
db: [ 'MySQL', 'PostgreSQL' ]
2729
exclude:
@@ -65,8 +67,7 @@ jobs:
6567
- uses: actions/checkout@v2
6668
- name: Get year/month for cache key
6769
id: get-date
68-
run: |
69-
echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
70+
run: echo "::set-output name=yearmonth::$(/bin/date -u "+%Y-%m")"
7071
shell: bash
7172
- name: Cache Gradle downloads
7273
uses: actions/cache@v2
@@ -97,6 +98,7 @@ jobs:
9798
runs-on: ubuntu-latest
9899
strategy:
99100
matrix:
101+
orm-version: [ '7.0.0-SNAPSHOT' ]
100102
db: [ 'MariaDB', 'MySQL', 'PostgreSQL', 'MSSQLServer', 'CockroachDB', 'Db2', 'Oracle' ]
101103
steps:
102104
- uses: actions/checkout@v2
@@ -135,6 +137,7 @@ jobs:
135137
strategy:
136138
fail-fast: false
137139
matrix:
140+
orm-version: [ '7.0.0-SNAPSHOT' ]
138141
# To list the available "feature versions" on adoptium.net (ignore "tip_version", it's not relevant):
139142
# https://api.adoptium.net/v3/info/available_releases
140143
# To list the available releases for a given "feature version" on adoptium.net (example for 16):
@@ -196,13 +199,11 @@ jobs:
196199
id: mainjdk-exportpath
197200
run: echo "::set-output name=path::${JAVA_HOME}"
198201
- name: Display exact version of JDK ${{ matrix.java.name }}
199-
run: |
200-
${{ steps.testjdk-exportpath.outputs.path }}/bin/java -version
202+
run: ${{ steps.testjdk-exportpath.outputs.path }}/bin/java -version
203+
- name: Print the effective ORM version used
204+
run: ./gradlew :hibernate-reactive-core:dependencyInsight --dependency org.hibernate.orm:hibernate-core -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep
201205
- name: Build and Test with Java ${{ matrix.java.name }}
202-
run: |
203-
./gradlew build -PshowStandardOutput -Pdocker -Ptest.jdk.version=${{ matrix.java.java_version_numeric }} \
204-
-Porg.gradle.java.installations.paths=${{ steps.mainjdk-exportpath.outputs.path }},${{ steps.testjdk-exportpath.outputs.path }} \
205-
${{ matrix.java.jvm_args && '-Ptest.jdk.launcher.args=' }}${{ matrix.java.jvm_args }}
206+
run: ./gradlew build -PshowStandardOutput -Pdocker -Ptest.jdk.version=${{ matrix.java.java_version_numeric }} -PhibernateOrmVersion='${{ matrix.orm-version }}' -PskipOrmVersionParsing -PenableSonatypeOpenSourceSnapshotsRep -Porg.gradle.java.installations.paths=${{ steps.mainjdk-exportpath.outputs.path }},${{ steps.testjdk-exportpath.outputs.path }} ${{ matrix.java.jvm_args && '-Ptest.jdk.launcher.args=' }}${{ matrix.java.jvm_args }}
206207
- name: Upload reports (if build failed)
207208
uses: actions/upload-artifact@v2
208209
if: failure()
@@ -215,22 +216,21 @@ jobs:
215216
if: github.event_name == 'push' && startsWith( github.ref, 'refs/heads/' )
216217
runs-on: ubuntu-latest
217218
steps:
218-
- uses: actions/checkout@v2
219-
- name: Set up JDK 11
220-
uses: actions/setup-java@v2.2.0
221-
with:
222-
distribution: 'temurin'
223-
java-version: 17
224-
- name: Create artifacts
225-
run: ./gradlew assemble
226-
- name: Detect the version of Hibernate Reactive
227-
id: detect-version
228-
run: |
229-
sed -E 's/^projectVersion( *= *| +)([^ ]+)/::set-output name=version::\2/g' gradle/version.properties
230-
- name: Publish snapshot to JBoss Nexus
231-
env:
232-
ORG_GRADLE_PROJECT_jbossNexusUser: ${{ secrets.JBOSS_NEXUS_USER }}
233-
ORG_GRADLE_PROJECT_jbossNexusPassword: ${{ secrets.JBOSS_NEXUS_PASSWORD }}
234-
if: endsWith( steps.detect-version.outputs.version, '-SNAPSHOT' ) && env.ORG_GRADLE_PROJECT_jbossNexusUser
235-
run: ./gradlew publishToJBossNexus closeAndReleaseJBossNexusStagingRepository
219+
- uses: actions/checkout@v2
220+
- name: Set up JDK 17
221+
uses: actions/setup-java@v2.2.0
222+
with:
223+
distribution: 'temurin'
224+
java-version: 17
225+
- name: Create artifacts
226+
run: ./gradlew assemble
227+
- name: Detect the version of Hibernate Reactive
228+
id: detect-version
229+
run: |
230+
sed -E 's/^projectVersion( *= *| +)([^ ]+)/::set-output name=version::\2/g' gradle/version.properties
231+
- name: Publish snapshots to OSSRH, close repository and release
232+
env:
233+
ORG_GRADLE_PROJECT_sonatypeOssrhUser: ${{ secrets.SONATYPE_OSSRH_USER }}
234+
ORG_GRADLE_PROJECT_sonatypeOssrhPassword: ${{ secrets.SONATYPE_OSSRH_PASSWORD }}
235+
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
236236

0 commit comments

Comments
 (0)