Skip to content

Commit f41c92b

Browse files
committed
Publish snapshots on OSSRH
1 parent b156bdb commit f41c92b

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,28 @@ jobs:
213213
if: failure()
214214
with:
215215
name: reports-java${{ matrix.java.name }}
216-
path: './**/build/reports/'
216+
path: './**/build/reports/'
217+
218+
snapshot:
219+
name: Create snapshot
220+
if: github.event_name == 'push' && startsWith( github.ref, 'refs/heads/' )
221+
runs-on: ubuntu-latest
222+
steps:
223+
- uses: actions/checkout@v2
224+
- name: Set up JDK 11
225+
uses: actions/[email protected]
226+
with:
227+
distribution: 'temurin'
228+
java-version: 11
229+
- name: Create artifacts
230+
run: ./gradlew assemble
231+
- name: Detect the version of Hibernate Reactive
232+
id: detect-version
233+
run: |
234+
sed -E 's/^projectVersion( *= *| +)([^ ]+)/::set-output name=version::\2/g' gradle/version.properties
235+
- name: Publish snapshots to OSSRH, close repository and release
236+
env:
237+
ORG_GRADLE_PROJECT_sonatypeOssrhUser: ${{ secrets.SONATYPE_OSSRH_USER }}
238+
ORG_GRADLE_PROJECT_sonatypeOssrhPassword: ${{ secrets.SONATYPE_OSSRH_PASSWORD }}
239+
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
240+

0 commit comments

Comments
 (0)