Update to versions catalog and newer dependencies #179
Workflow file for this run
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
name: Build | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '**' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
validation: | |
name: "Validation" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: gradle/wrapper-validation-action@v1 | |
create_staging_repository: | |
runs-on: ubuntu-latest | |
needs: [ validation ] | |
name: Create staging repository | |
outputs: | |
repository_id: ${{ steps.create.outputs.repository_id }} | |
steps: | |
- id: create | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: nexus-actions/create-nexus-staging-repo@v1.1 | |
with: | |
username: appmattus | |
password: ${{ secrets.SONATYPE_PASSWORD }} | |
staging_profile_id: ${{ secrets.SONATYPE_PROFILE_ID }} | |
description: ${{ github.repository }}/${{ github.workflow }}#${{ github.run_number }} | |
build: | |
needs: [ create_staging_repository ] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macOS-latest, ubuntu-latest, windows-latest ] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Check | |
run: ./gradlew check | |
- name: Build | |
run: ./gradlew build -x check -x lintVitalRelease | |
- name: Prepare tag properties (*nix) | |
run: | | |
echo "${{secrets.GPG_SIGNING_SECRET_KEY_RING_FILE_BASE64}}" > $HOME/.gradle/sonatype-appmattus-keys.gpg.b64 | |
base64 -d $HOME/.gradle/sonatype-appmattus-keys.gpg.b64 > $HOME/.gradle/sonatype-appmattus-keys.gpg | |
echo "${{secrets.GPG_GRADLE_PROPERTIES}}" > $HOME/.gradle/gradle.properties | |
if: runner.os != 'Windows' && startsWith(github.ref, 'refs/tags/') | |
- name: Prepare tag properties (windows) | |
run: | | |
echo "${{secrets.GPG_SIGNING_SECRET_KEY_RING_FILE_BASE64}}" > $HOME/.gradle/sonatype-appmattus-keys.gpg.b64 | |
certutil -decode $HOME/.gradle/sonatype-appmattus-keys.gpg.b64 $HOME/.gradle/sonatype-appmattus-keys.gpg | |
echo "${{secrets.GPG_GRADLE_PROPERTIES}}" > $HOME/.gradle/gradle.properties | |
if: runner.os == 'Windows' && startsWith(github.ref, 'refs/tags/') | |
- name: Upload tag | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
SONATYPE_REPOSITORY_ID: ${{ needs.create_staging_repository.outputs.repository_id }} | |
run: ./gradlew publishAllPublicationsToMavenCentral -P"signing.secretKeyRingFile=$(echo $HOME/.gradle/sonatype-appmattus-keys.gpg)" | |
close: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Prepare tag properties (*nix) | |
run: | | |
mkdir -p $HOME/.gradle | |
echo "${{secrets.GPG_SIGNING_SECRET_KEY_RING_FILE_BASE64}}" > $HOME/.gradle/sonatype-appmattus-keys.gpg.b64 | |
base64 -d $HOME/.gradle/sonatype-appmattus-keys.gpg.b64 > $HOME/.gradle/sonatype-appmattus-keys.gpg | |
echo "${{secrets.GPG_GRADLE_PROPERTIES}}" > $HOME/.gradle/gradle.properties | |
- name: Close and release tag | |
run: ./gradlew closeAndReleaseRepository |