[Gradle Release Plugin] - pre tag commit: '2.2.35'. #2380
This file contains hidden or 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
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| name: Continuous Integration | |
| on: | |
| push: | |
| branches: ['*'] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: "0 7 * * *" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java: [17, 21, 25] | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0 | |
| with: | |
| distribution: 'zulu' | |
| java-version: ${{ matrix.java }} | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 | |
| with: | |
| validate-wrappers: true | |
| - name: Build with Gradle | |
| run: ./gradlew build jacocoTestReport --info -PjdkVersion=${{ matrix.java }} | |
| - name: Upload to Sonatype | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.java == '17' | |
| run: | | |
| echo "${{ secrets.MAVEN_GPG_PRIVATE_KEY }}" > ~/.gradle/secring.gpg.b64 | |
| base64 -d ~/.gradle/secring.gpg.b64 > ~/.gradle/secring.gpg | |
| ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -PjdkVersion=${{ matrix.java }} -PsonatypeUsername=${SONATYPE_USERNAME} -PsonatypePassword=${SONATYPE_PASSWORD} -Psigning.keyId=${GPG_KEYID} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) -Psigning.password=${GPG_PASSWORD} | |
| env: | |
| GPG_KEYID: ${{ secrets.MAVEN_GPG_KEYID }} | |
| GPG_PASSWORD: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
| SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
| SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
| - name: Upload coverage to Qlty | |
| uses: qltysh/qlty-action/coverage@a19242102d17e497f437d7466aa01b528537e899 # v2.2.0 | |
| with: | |
| token: ${{ secrets.QLTY_COVERAGE_TOKEN }} | |
| format: jacoco | |
| add-prefix: src/main/java/ | |
| files: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml |