mirror of
https://github.com/BentoBoxWorld/AcidIsland.git
synced 2024-11-21 18:15:51 +01:00
Update GitHub action build script
This commit is contained in:
parent
0b6dc8c76a
commit
d0a4cd1e28
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@ -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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user