Merge pull request #260 from inversion-api/dev-0.9.11.1 #55
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
# | |
# 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: 8 | |
- 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 |