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/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
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();
}
}