Skip to content

Commit

Permalink
[hibernate#1973] Merge GitHub workflows into one file
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideD committed Aug 8, 2024
1 parent a3b2b8e commit 6dcb67e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 251 deletions.
249 changes: 0 additions & 249 deletions .github/workflows/build-snapshots.yml

This file was deleted.

36 changes: 34 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@ name: Hibernate Reactive CI
on:
push:
branches:
- main
- 'main'
- 'wip/**'
tags:
- '2.*'
pull_request:
branches:
- main
- 'main'
- 'wip/**'
# We run the build every hour to check for changes in the snapshots
schedule:
# * is a special character in YAML, so you have to quote this string
# Run every hour at minute 25
- cron: '25 * * * *'
# Allow running this workflow against a specific branch/tag
workflow_dispatch:

# See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting.
concurrency:
Expand Down Expand Up @@ -219,6 +228,29 @@ jobs:
name: reports-java${{ matrix.java.name }}
path: './**/build/reports/'

snapshot:
name: Release snapshot
if: github.event_name == 'push' && startsWith( github.ref, 'refs/heads/wip/' )
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: 11
- name: Create artifacts
run: ./gradlew assemble
- name: Detect the version of Hibernate Reactive
id: detect-version
run: |
sed -E 's/^projectVersion( *= *| +)([^ ]+)/::set-output name=version::\2/g' gradle/version.properties
- name: Publish snapshots to OSSRH, close repository and release
env:
ORG_GRADLE_PROJECT_sonatypeOssrhUser: ${{ secrets.SONATYPE_OSSRH_USER }}
ORG_GRADLE_PROJECT_sonatypeOssrhPassword: ${{ secrets.SONATYPE_OSSRH_PASSWORD }}
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository

release:
name: Release
if: github.event_name == 'push' && startsWith( github.ref, 'refs/tags/' )
Expand Down

0 comments on commit 6dcb67e

Please sign in to comment.