|
| 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 | 9 | branches:
|
11 |
| - - main |
| 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: |
12 | 17 |
|
13 | 18 | # See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting.
|
14 | 19 | concurrency:
|
@@ -219,37 +224,25 @@ jobs:
|
219 | 224 | name: reports-java${{ matrix.java.name }}
|
220 | 225 | path: './**/build/reports/'
|
221 | 226 |
|
222 |
| - release: |
223 |
| - name: Release |
224 |
| - 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/' ) |
225 | 230 | runs-on: ubuntu-latest
|
226 | 231 | steps:
|
227 |
| - - uses: actions/checkout@v2 |
228 |
| - - name: Set git username and email |
229 |
| - run: | |
230 |
| - git config --global user.email "[email protected]" |
231 |
| - git config --global user.name "hibernate" |
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: Install SSH key |
240 |
| - uses: shimataro/ssh-key-action@v2 |
241 |
| - with: |
242 |
| - key: ${{ secrets.HIBERNATE_ORG_SSH_KEY }} |
243 |
| - name: id_rsa_hibernate.org |
244 |
| - known_hosts: ${{ secrets.HIBERNATE_ORG_SSH_KNOWN_HOSTS }} |
245 |
| - config: | |
246 |
| - Host github.com |
247 |
| - User hibernate |
248 |
| - IdentityFile ~/.ssh/id_rsa_hibernate.org |
249 |
| - - name: Publish documentation on Hibernate.org |
250 |
| - run: ./gradlew publishDocumentation -PdocPublishBranch=production |
251 |
| - - name: Publish artifacts to OSSRH, close repository and release |
252 |
| - env: |
253 |
| - ORG_GRADLE_PROJECT_sonatypeOssrhUser: ${{ secrets.SONATYPE_OSSRH_USER }} |
254 |
| - ORG_GRADLE_PROJECT_sonatypeOssrhPassword: ${{ secrets.SONATYPE_OSSRH_PASSWORD }} |
255 |
| - 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