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] Keep GitHub actions configuration consistent between…
… branches We keep snapshot releases in separate branches and we need to update the configuration accordingly. Otherwise, we will have 3 different GitHub actions configurations
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -4,11 +4,13 @@ on: | |
push: | ||
branches: | ||
- main | ||
- 'wip/*' | ||
tags: | ||
- '2.*' | ||
pull_request: | ||
branches: | ||
- main | ||
- 'wip/*' | ||
|
||
# See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting. | ||
concurrency: | ||
|
@@ -219,6 +221,29 @@ jobs: | |
name: reports-java${{ matrix.java.name }} | ||
path: './**/build/reports/' | ||
|
||
snapshot: | ||
name: Create snapshot only when the branch name starts with `wip/` | ||
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/' ) | ||
|