From ea1ec246404fc39cdffc73ae7837edb720e82426 Mon Sep 17 00:00:00 2001 From: Hans Kristian Date: Thu, 16 Nov 2023 14:37:51 +0100 Subject: [PATCH] Update build.yml - Correct semver for java 8 - Bump checkout - Remove deprecated set-output --- .github/workflows/build.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 568b7e8..fd16953 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,17 +7,21 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '1.8', '11' ] + java: [ '8', '11' ] name: build java ${{ matrix.java }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true - name: Set up java - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: ${{ matrix.java }} + distribution: temurin + server-id: github + cache: 'maven' + - name: Build with Maven run: mvn -B package --no-transfer-progress --file pom.xml @@ -37,7 +41,7 @@ jobs: else TAG=${GITHUB_REF#refs/heads/}-SNAPSHOT fi - echo ::set-output name=version::${TAG//\//-} + echo "version=${TAG//\//-}" >> $GITHUB_OUTPUT deploy_snapshot: if: startsWith(github.ref, 'refs/heads/') @@ -46,7 +50,7 @@ jobs: name: Deploy snapshot steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true - uses: digipost/action-maven-publish@1.1.0 @@ -62,7 +66,7 @@ jobs: name: Release to Sonatype steps: - name: Check out Git repository - uses: actions/checkout@v1 + uses: actions/checkout@v4 with: submodules: true - name: Release to Central Repository