Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 14 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name: Build
name: SonarQube
on:
push:
branches:
- develop
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
name: Build and analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -17,31 +16,25 @@ jobs:
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '21'
- name: Cache SonarCloud packages
java-version: 21
distribution: 'zulu' # Alternative distribution options are available
- name: Cache SonarQube packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build and analyze
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_BentoBox
- name: Debug - List target directory
run: ls -la /home/runner/work/BentoBox/BentoBox/target
- 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@v4
with:
name: Package
path: staging
run: ./gradlew build sonar --info
44 changes: 0 additions & 44 deletions .github/workflows/modrinth-publish.yml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ $RECYCLE.BIN/
*.log
*.ctxt
.mtj.tmp/
*.jar
*.war
*.nar
*.ear
Expand Down
Loading