diff --git a/.github/java-config.env b/.github/java-config.env new file mode 100644 index 0000000..ce21eac --- /dev/null +++ b/.github/java-config.env @@ -0,0 +1,2 @@ +JAVA_VERSION=17 +JAVA_DISTRIBUTION=temurin diff --git a/.github/workflows/do-release.yml b/.github/workflows/do-release.yml index 9ca33ad..2ae5ea9 100644 --- a/.github/workflows/do-release.yml +++ b/.github/workflows/do-release.yml @@ -21,11 +21,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Read Java Config + run: cat ${{ github.workspace }}/.github/java-config.env >> $GITHUB_ENV - name: Set up Java and credentials uses: actions/setup-java@v3 with: - java-version: 8 - distribution: 'adopt' + java-version: ${{ env.JAVA_VERSION }} + distribution: ${{ env.JAVA_DISTRIBUTION }} server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index d1e6b7e..7d7ee16 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -12,11 +12,13 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Read Java Config + run: cat ${{ github.workspace }}/.github/java-config.env >> $GITHUB_ENV - name: Set up Apache Maven Central uses: actions/setup-java@v3 with: - java-version: 17 - distribution: 'adopt' + java-version: ${{ env.JAVA_VERSION }} + distribution: ${{ env.JAVA_DISTRIBUTION }} cache: 'maven' - name: Build diff --git a/.github/workflows/push-snapshots.yaml b/.github/workflows/push-snapshots.yaml index 7b4493b..faf670c 100644 --- a/.github/workflows/push-snapshots.yaml +++ b/.github/workflows/push-snapshots.yaml @@ -15,11 +15,13 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Read Java Config + run: cat ${{ github.workspace }}/.github/java-config.env >> $GITHUB_ENV - name: Set up Apache Maven Central uses: actions/setup-java@v3 with: - java-version: 8 - distribution: 'adopt' + java-version: ${{ env.JAVA_VERSION }} + distribution: ${{ env.JAVA_DISTRIBUTION }} server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD