test log #23
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 & Release to Maven Central | |
on: | |
push: | |
branches: | |
- develop | |
tags: | |
- 'v*.*.*' | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
JVM_OPTS: -Xmx4800m | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2.1.0 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Check if ref is a PR merge branch | |
id: check_if_pr_merge | |
run: echo "is_pr_merge=$(if [[ "${{ github.ref }}" == refs/pull/*/merge ]]; then echo 'true'; else echo 'false'; fi)" >> $GITHUB_OUTPUT | |
- name: Lint Release | |
run: ./gradlew lintRelease; | |
if: ${{ success() && steps.check_if_pr_merge.outputs.is_pr_merge == 'true' }} | |
- name: Deploy To Maven Central | |
run: | | |
echo ${{ secrets.MAVEN_CENTRAL_SEC_RING }} | base64 -d > $HOME/secring.gpg | |
gpg --import --batch $HOME/secring.gpg | |
./gradlew clean publish \ | |
-PmavenCentralUsername="${{ secrets.SONATYPE_USERNAME }}" \ | |
-PmavenCentralPassword="${{ secrets.SONATYPE_PASSWORD }}" \ | |
-Psigning.keyId="${{ secrets.MAVEN_CENTRAL_KEY_ID }}" \ | |
-Psigning.password="${{ secrets.MAVEN_CENTRAL_KEY_PASSPHRASE }}" \ | |
-Psigning.secretKeyRingFile=$HOME/secring.gpg \ | |
-Porg.gradle.parallel=false \ | |
-Porg.gradle.daemon=false \ | |
--no-daemon | |
if: ${{ success() && github.ref == 'refs/tags/v*.*.*' }} | |
- name: Create Github Release | |
uses: marvinpinto/action-automatic-releases@v1.2.1 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: false | |
if: ${{ success() && github.ref == 'refs/tags/v*.*.*' }} | |