diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 2731b2a8..e23be00b 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -14,22 +14,27 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4 + - name: Set up JDK 17 - uses: actions/setup-java@v4.0.0 + uses: actions/setup-java@v4 with: java-version: 17 distribution: temurin + - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@v1.1.0 + - name: Build with Gradle - uses: gradle/gradle-build-action@v2.10.0 + uses: gradle/gradle-build-action@v2.11.1 with: arguments: build + - name: Get build artifact ready run: mkdir staging && cp build/libs/*.jar staging + - name: Upload a Build Artifact - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4 with: name: dev-build path: staging diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 5e0009de..763a754b 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -1,40 +1,39 @@ -name: Sonarcloud +name: SonarCloud on: push: branches: - main pull_request: + types: [opened, synchronize, reopened] branches: - main - types: [opened, synchronize, reopened] jobs: build: - name: Build + name: Build and analyze runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v4.1.1 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK 17 - uses: actions/setup-java@v4.0.0 + uses: actions/setup-java@v4 with: java-version: 17 - distribution: temurin - - name: Cache Gradle packages - uses: actions/cache@v3 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: ${{ runner.os }}-gradle + distribution: 'temurin' - name: Cache SonarCloud packages uses: actions/cache@v3 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar + - name: Cache Gradle packages + uses: actions/cache@v3 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle - name: Build and analyze env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: ./gradlew build sonarqube --info + run: ./gradlew build sonar --info diff --git a/build.gradle b/build.gradle index 790d10e8..9c56673f 100644 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,7 @@ repositories { } dependencies { - implementation 'net.guizhanss:GuizhanLib-api:1.6.1' + implementation 'net.guizhanss:GuizhanLib-api:1.7.0' implementation 'dev.sefiraat:SefiLib:0.2.6' implementation 'org.bstats:bstats-bukkit:3.0.2' @@ -53,11 +53,11 @@ processResources { } } -sonarqube { +sonar { properties { - property 'sonar.host.url', 'https://sonarcloud.io' - property 'sonar.organization', 'slimefunguguproject' - property 'sonar.projectKey', 'SlimefunGuguProject_Bump' + property "sonar.projectKey", "SlimefunGuguProject_Bump" + property "sonar.organization", "slimefunguguproject" + property "sonar.host.url", "https://sonarcloud.io" } } diff --git a/src/main/java/io/github/slimefunguguproject/bump/implementation/Bump.java b/src/main/java/io/github/slimefunguguproject/bump/implementation/Bump.java index 39e011d1..ccb87098 100644 --- a/src/main/java/io/github/slimefunguguproject/bump/implementation/Bump.java +++ b/src/main/java/io/github/slimefunguguproject/bump/implementation/Bump.java @@ -179,6 +179,6 @@ public String getWikiURL() { } private boolean isSCSlimefun(@Nonnull String sfVersion) { - return sfVersion.endsWith("-canary") || sfVersion.endsWith("-release"); + return sfVersion.endsWith("-canary") || sfVersion.endsWith("-release") || sfVersion.endsWith("-Beta") || sfVersion.endsWith("-Insider"); } }