Skip to content

Github Actions testing #46

Github Actions testing

Github Actions testing #46

#
# 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 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 }}
run: |
./gradlew sign
# env:
# OSSRH_SIGNING: ${{ secrets.OSSRH_SIGNING }}
# run: |
# echo -e "\n#START CICD VARS" >> gradle.properties
# echo $OSSRH_SIGNING | base64 -d >> gradle.properties
# echo -e "#END CICD VARS" >> gradle.properties
# ./gradlew --stacktrace publishToSonatype closeAndReleaseSonatypeStagingRepository