From bb0c8fe4e82ee77b89b6ef4e4f2d854d5d9dd85b Mon Sep 17 00:00:00 2001
From: FN-FAL113
Date: Fri, 22 Dec 2023 20:37:29 +0800
Subject: [PATCH] use blob builds with auto updater
---
.github/workflows/blob-builds.yml | 29 ++++++++++++++++
.gitignore | 3 ++
README.md | 9 ++++-
pom.xml | 33 +++++++++++++++++--
.../me/fnfal113/sfchunkinfo/SfChunkInfo.java | 7 ++--
5 files changed, 74 insertions(+), 7 deletions(-)
create mode 100644 .github/workflows/blob-builds.yml
diff --git a/.github/workflows/blob-builds.yml b/.github/workflows/blob-builds.yml
new file mode 100644
index 0000000..097765b
--- /dev/null
+++ b/.github/workflows/blob-builds.yml
@@ -0,0 +1,29 @@
+name: Build and Deploy to Blob-Builds
+
+on:
+ push:
+ branches:
+ - main
+ workflow_dispatch:
+
+
+jobs:
+ blob-build-deploy:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v1
+ - name: Set up JDK 16
+ uses: actions/setup-java@v1
+ with:
+ java-version: 16
+
+ - name: Build with Maven
+ run: mvn package
+
+ - name: Upload to Blob Builds
+ uses: WalshyDev/blob-builds/gh-action@main
+ with:
+ project: SfChunkInfo
+ apiToken: ${{ secrets.BLOB_BUILDS_API_TOKEN }}
+ releaseNotes: ${{ github.event.head_commit.message }}
diff --git a/.gitignore b/.gitignore
index 4788b4b..c3bbc12 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,9 @@
*.ipr
*.iws
+# vs code
+*.vscode
+
# IntelliJ
out/
diff --git a/README.md b/README.md
index 1e1b72a..ede2ea4 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ Works on 1.14+ minecraft spigot/paper/forks version
```Permission node: sfchunkinfo.scan.others```
## Download official build (with auto updates)
-[![Build Status](https://thebusybiscuit.github.io/builds/FN-FAL113/SfChunkInfo/main/badge.svg)](https://thebusybiscuit.github.io/builds/FN-FAL113/SfChunkInfo/main)
+### [Download Official Jar](https://blob.build/project/SfChunkInfo)
## Scanning a location chunk
@@ -49,3 +49,10 @@ Works on 1.14+ minecraft spigot/paper/forks version
+
+## 💖 Support the Project/Dev
+I develop stuff for free with dedication and hard work. Sharing this project with fellow minecraft gamers/server owners or giving it a star is a huge sign of appreciation!
+a donation button (currently using parent's paypal due to my pending account requirements).
+
+
+
diff --git a/pom.xml b/pom.xml
index 5ffb944..94cb9c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
me.fnfal113
SfChunkInfo
- Unoffical-1.5.0
+ Unoffical-1.6.0
jar
SfChunkInfo
@@ -17,6 +17,8 @@
UTF-8
+ https://github.com/FN-FAL113/SfChunkInfo
+
${project.name} v${project.version}
clean package
@@ -45,7 +47,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.2.4
+ 3.5.1
package
@@ -54,15 +56,27 @@
false
+ true
+
org.bstats
me.fnfal113.sfchunkinfo.bstats
+
+
+ io.github.bakedlibs.dough.updater
+ me.fnfal113.sfchunkinfo.dough.updater
+
+
+
+ io.github.bakedlibs.dough.versions
+ me.fnfal113.sfchunkinfo.dough.versions
+
@@ -81,6 +95,7 @@
spigotmc-repo
https://hub.spigotmc.org/nexus/content/repositories/snapshots/
+
sonatype
https://oss.sonatype.org/content/groups/public/
@@ -102,6 +117,20 @@
provided
+
+ com.github.baked-libs.dough
+ dough-updater
+ 4b28bd408e
+ compile
+
+
+
+ com.github.baked-libs.dough
+ dough-common
+ 4b28bd408e
+ compile
+
+
org.spigotmc
spigot-api
diff --git a/src/main/java/me/fnfal113/sfchunkinfo/SfChunkInfo.java b/src/main/java/me/fnfal113/sfchunkinfo/SfChunkInfo.java
index 68ed89c..04603c9 100644
--- a/src/main/java/me/fnfal113/sfchunkinfo/SfChunkInfo.java
+++ b/src/main/java/me/fnfal113/sfchunkinfo/SfChunkInfo.java
@@ -1,7 +1,7 @@
package me.fnfal113.sfchunkinfo;
+import io.github.bakedlibs.dough.updater.BlobBuildUpdater;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
-import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.GitHubBuildsUpdater;
import me.fnfal113.sfchunkinfo.commands.ScanChunk;
import org.bstats.bukkit.Metrics;
import org.bukkit.plugin.java.JavaPlugin;
@@ -29,10 +29,9 @@ public void onEnable() {
getConfig().options().copyDefaults();
saveDefaultConfig();
- if (getConfig().getBoolean("auto-update", true) && getDescription().getVersion().startsWith("DEV - ")) {
- new GitHubBuildsUpdater(this, getFile(), "FN-FAL113/SfChunkInfo/main").start();
+ if (getConfig().getBoolean("auto-update", true) && getDescription().getVersion().startsWith("Dev - ")) {
+ new BlobBuildUpdater(this, getFile(), "SfChunkInfo").start();
}
-
}
@Override