forked from hibernate/hibernate-reactive
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[hibernate#1973] Merge GitHub workflows into one file
- Loading branch information
Showing
2 changed files
with
34 additions
and
251 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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/' ) | ||
|