tisoft/rsyntaxtextarea-antlr4-extension

View on GitHub
.github/workflows/maven-deploy-snapshot.yml

Summary

Maintainability
Test Coverage
name: Java CI with Maven - Deploy Snapshot

on:
  push:
    branches: [ main ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Import GPG Owner Trust
      run: echo ${{secrets.GPG_OWNERTRUST}} | base64 --decode | gpg --import-ownertrust

    - name: Import GPG key
      run: echo ${{secrets.GPG_SECRET_KEYS}} | base64 --decode | gpg --import --no-tty --batch --yes
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
        server-id: ossrh
        server-username: MAVEN_USERNAME
        server-password: MAVEN_PASSWORD
    - name: Build with Maven
      run: mvn --no-transfer-progress -B deploy -Prelease -Drevision=${GITHUB_REF##*/} -Dgpg.keyname=${{secrets.GPG_KEYNAME}} -Dgpg.passphrase=${{secrets.GPG_PASSPHRASE}} --file pom.xml
      env:
        MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
        MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
    - name: Test & publish code coverage
      uses: paambaati/codeclimate-action@v2.7.5
      env:
        CC_TEST_REPORTER_ID: "0ae6ed6c800841ebe2c77dbe17f0dff679e51a80daf2b45f6afa40ed8dec60c7"
        JACOCO_SOURCE_PATH: "${{github.workspace}}/src/main/java"
      with:
        coverageLocations: ${{github.workspace}}/target/site/jacoco/jacoco.xml:jacoco