Skip to content

Merge pull request #255 from inversion-api/dev-0.9.x #52

Merge pull request #255 from inversion-api/dev-0.9.x

Merge pull request #255 from inversion-api/dev-0.9.x #52

#
# Resources
# - "Build with Gradle" Github Action: https://github.com/inversion-api/inversion-engine/new/main?filename=.github%2Fworkflows%2Fgradle.yml&workflow_template=ci%2Fgradle
# - "Executing Gradle builds on GitHub Actions" doco on Gradle.org: https://docs.gradle.org/current/userguide/github-actions.html
# - "How to Sign and Release to The Central Repository with GitHub Actions" : https://gist.github.com/sualeh/ae78dc16123899d7942bc38baba5203c
# - "Gradle Build Action" : https://github.com/marketplace/actions/gradle-build-action
name: Build Gradle project
on:
push:
branches: [ "release-*"]
jobs:
build-gradle-project:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Execute Gradle build
run: ./gradlew -Drelease=true build
- name: Publish to Sonotype and OSSRH
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.OSSRH_SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_SONOTYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_SONOTYPE_PASSWORD }}
run: |
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository