From 0860a71a032ccb0cc7f65fbe2c8330c78e8218f6 Mon Sep 17 00:00:00 2001 From: Sefiraat Date: Fri, 14 Jun 2024 08:05:51 +0100 Subject: [PATCH 1/2] Move to blob builds --- .github/workflows/{maven.yml => build.yml} | 17 +++++----- .github/workflows/upload.yml | 31 +++++++++++++++++++ .../io/github/sefiraat/networks/Networks.java | 9 ++---- 3 files changed, 41 insertions(+), 16 deletions(-) rename .github/workflows/{maven.yml => build.yml} (55%) create mode 100644 .github/workflows/upload.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/build.yml similarity index 55% rename from .github/workflows/maven.yml rename to .github/workflows/build.yml index fdc054f4..7c437b3e 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/build.yml @@ -1,26 +1,23 @@ -name: Java CI +name: Test Build on: - push: - branches: - - master - - dev pull_request: branches: - master jobs: build: - + name: Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.1.7 + - name: Set up JDK 16 - uses: actions/setup-java@v4 + uses: actions/setup-java@v4.2.1 with: - distribution: 'temurin' java-version: 16 - cache: 'maven' + distribution: adopt + - name: Build with Maven - run: mvn package --file pom.xml \ No newline at end of file + run: mvn package diff --git a/.github/workflows/upload.yml b/.github/workflows/upload.yml new file mode 100644 index 00000000..e0459197 --- /dev/null +++ b/.github/workflows/upload.yml @@ -0,0 +1,31 @@ +name: Build and Upload + +on: + push: + branches: + - master + +jobs: + build: + name: Build and Upload + runs-on: ubuntu-latest + if: contains(github.event.head_commit.message, '[ci skip]') == false + + steps: + - uses: actions/checkout@v4.1.7 + + - name: Set up JDK 16 + uses: actions/setup-java@v4.2.1 + with: + java-version: 16 + distribution: adopt + + - name: Build with Maven + run: mvn package + + - name: Upload to Builds + uses: WalshyDev/blob-builds/gh-action@main + with: + project: SlimeTinker + apiToken: ${{ secrets.BLOB_BUILDS_API_TOKEN }} + releaseNotes: ${{ github.event.head_commit.message }} diff --git a/src/main/java/io/github/sefiraat/networks/Networks.java b/src/main/java/io/github/sefiraat/networks/Networks.java index 8923733e..2009b502 100644 --- a/src/main/java/io/github/sefiraat/networks/Networks.java +++ b/src/main/java/io/github/sefiraat/networks/Networks.java @@ -7,6 +7,7 @@ import io.github.sefiraat.networks.slimefun.NetworkSlimefunItems; import io.github.sefiraat.networks.slimefun.network.NetworkController; import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; +import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.BlobBuildUpdater; import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.GitHubBuildsUpdater; import org.bstats.bukkit.Metrics; import org.bstats.charts.AdvancedPie; @@ -59,12 +60,8 @@ public void onEnable() { } public void tryUpdate() { - if (getConfig().getBoolean("auto-update") - && getDescription().getVersion().startsWith("DEV") - ) { - String updateLocation = MessageFormat.format("{0}/{1}/{2}", this.username, this.repo, this.branch); - GitHubBuildsUpdater updater = new GitHubBuildsUpdater(this, getFile(), updateLocation); - updater.start(); + if (getConfig().getBoolean("auto-update") && getDescription().getVersion().startsWith("Dev")) { + new BlobBuildUpdater(this, getFile(), "Networks", "Dev").start(); } } From a0729a68ba0bcc5992c811307e33d160151856d6 Mon Sep 17 00:00:00 2001 From: Sefiraat Date: Fri, 14 Jun 2024 08:44:42 +0100 Subject: [PATCH 2/2] change version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c5fb7901..3a99948e 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 io.github.sefiraat networks - MODIFIED_1.2.0 + MODIFIED