Skip to content

Commit d0a4cd1

Browse files
committed
Update GitHub action build script
1 parent 0b6dc8c commit d0a4cd1

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
name: SonarCloud
1+
name: Build
22
on:
33
push:
44
branches:
55
- develop
6-
- master
76
pull_request:
87
types: [opened, synchronize, reopened]
98
jobs:
109
build:
11-
name: Build and analyze
10+
name: Build
1211
runs-on: ubuntu-latest
1312
steps:
1413
- uses: actions/checkout@v3
1514
with:
1615
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
17-
- name: Set up JDK 17
16+
- name: Set up JDK 21
1817
uses: actions/setup-java@v3
1918
with:
2019
distribution: 'adopt'
21-
java-version: 17
20+
java-version: '21'
2221
- name: Cache SonarCloud packages
2322
uses: actions/cache@v3
2423
with:
@@ -35,4 +34,12 @@ jobs:
3534
env:
3635
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
3736
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
38-
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BentoBoxWorld_AcidIsland
37+
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BentoBoxWorld_AcidIsland
38+
- run: mvn --batch-mode clean org.jacoco:jacoco-maven-plugin:prepare-agent install
39+
- run: mkdir staging && cp target/*.jar staging
40+
- name: Save artifacts
41+
uses: actions/upload-artifact@v3
42+
with:
43+
name: Package
44+
path: staging
45+

0 commit comments

Comments
 (0)