Skip to content

ci: Submit Gradle dependencies for Dependency Graph #93

ci: Submit Gradle dependencies for Dependency Graph

ci: Submit Gradle dependencies for Dependency Graph #93

Workflow file for this run

name: Java CI
on:
- push
jobs:
build:
name: Java ${{ matrix.java }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
java:
- 8
- 11
os:
- ubuntu
- windows
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
java-package: jdk
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build with Gradle
run: ./gradlew build
- name: Deploy to Maven Central
if: matrix.os == 'ubuntu' && matrix.java == 8 && startsWith(github.ref, 'refs/tags/v')
run: |
echo '${{ secrets.SIGNING_KEY }}' | base64 -d > /tmp/signing_key.gpg
./gradlew \
'-PnexusUsername=${{ secrets.NEXUS_USERNAME }}' \
'-PnexusPassword=${{ secrets.NEXUS_PASSWORD }}' \
'-Psigning.keyId=${{ secrets.SIGNING_KEY_ID }}' \
'-Psigning.password=${{ secrets.SIGNING_PASSWORD }}' \
'-Psigning.secretKeyRingFile=/tmp/signing_key.gpg' \
uploadArchives closeAndReleaseRepository
- name: Stop Gradle Daemon
run: ./gradlew --stop