Skip to content

Github Actions testing #39

Github Actions testing

Github Actions testing #39

#
# 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:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
run: |
echo -e "\n" >> gradle.properties
echo -e "signingKey=$SIGNING_KEY" >> gradle.properties
echo -e "signingKeyId=$SIGNING_KEY_ID" >> gradle.properties
echo -e "signingKeyPassword=$SIGNING_PASSWORD" >> gradle.properties
# cat <(echo -e "${{ secrets.OSSRH_SIGNING }}") >> gradle.properties
# ./gradlew --stacktrace sign
# ./gradlew --stacktrace publishToSonatype closeAndReleaseSonatypeStagingRepository