From b9a44c71c103c9ed1993b8eba4e1fd7ea91340ba Mon Sep 17 00:00:00 2001 From: reza1057 Date: Sun, 26 Nov 2023 15:10:00 +0330 Subject: [PATCH] Revert "[enhancement] build with java 8 in actions" This reverts commit 3936043c1486699c5b208ee1db73530037fa065e. --- .github/workflows/build.yml | 43 +++++++++++++++++++---------------- .github/workflows/release.yml | 42 +++++++++++++++++----------------- pom.xml | 2 +- 3 files changed, 45 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50149b0..54f1f37 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,3 +1,6 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + name: Build and deploy per push on: @@ -12,31 +15,31 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: 8 - distribution: temurin - cache: maven - server-id: ossrh - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} - gpg-passphrase: MAVEN_GPG_PASSPHRASE - - name: Configure Git user - run: | + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: temurin + cache: maven + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Configure Git user + run: | git config user.email "actions@github.com" git config user.name "GitHub Actions" - - name: Build with Maven - run: mvn -B package --file pom.xml - - name: Publish to the Maven Central Repository - run: | + - name: Build with Maven + run: mvn -B package --file pom.xml + - name: Publish to the Maven Central Repository + run: | mvn \ --no-transfer-progress \ --batch-mode \ deploy -Pbuild - env: + env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \ No newline at end of file + MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0bffb3..0f15676 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Java JDK uses: actions/setup-java@v3 with: - java-version: 8 + java-version: 11 distribution: temurin cache: maven server-id: github @@ -37,31 +37,31 @@ jobs: needs: release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - with: - ref: v${{ github.event.inputs.releaseVersion }} - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: 8 - distribution: temurin - cache: maven - server-id: ossrh - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} - gpg-passphrase: MAVEN_GPG_PASSPHRASE - - name: Configure Git user - run: | + - uses: actions/checkout@v3 + with: + ref: v${{ github.event.inputs.releaseVersion }} + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: temurin + cache: maven + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Configure Git user + run: | git config user.email "actions@github.com" git config user.name "GitHub Actions" - - name: Release and publish to the Maven Central Repository - run: | + - name: Release and publish to the Maven Central Repository + run: | mvn \ --no-transfer-progress \ --batch-mode \ deploy -Pbuild - env: + env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \ No newline at end of file + MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} diff --git a/pom.xml b/pom.xml index 87aa493..b3a1573 100644 --- a/pom.xml +++ b/pom.xml @@ -202,7 +202,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.1.0 sign-artifacts