From d0a4cd1e283de4b784d59eb22d6a364f11cb0d6d Mon Sep 17 00:00:00 2001 From: tastybento Date: Fri, 8 Nov 2024 15:34:34 -0800 Subject: [PATCH] Update GitHub action build script --- .github/workflows/build.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 35b2b32..6fd3a4c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,24 +1,23 @@ -name: SonarCloud +name: Build on: push: branches: - develop - - master pull_request: types: [opened, synchronize, reopened] jobs: build: - name: Build and analyze + name: Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: distribution: 'adopt' - java-version: 17 + java-version: '21' - name: Cache SonarCloud packages uses: actions/cache@v3 with: @@ -35,4 +34,12 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BentoBoxWorld_AcidIsland \ No newline at end of file + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BentoBoxWorld_AcidIsland + - run: mvn --batch-mode clean org.jacoco:jacoco-maven-plugin:prepare-agent install + - run: mkdir staging && cp target/*.jar staging + - name: Save artifacts + uses: actions/upload-artifact@v3 + with: + name: Package + path: staging + \ No newline at end of file