diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..a2d1453 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,32 @@ +name: Metrics Deployment + +on: + push: + branches: + - master + +jobs: + publish: + + name: Upload Release + runs-on: ubuntu-latest + if: contains(github.event.head_commit.message, '[ci skip]') == false + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 16 + uses: actions/setup-java@v1 + with: + java-version: 16 + + - name: Build with Maven + run: mvn -B package + + - name: Upload to Blob Builds + uses: WalshyDev/blob-builds/gh-action@main + with: + project: FoxyMachines + apiToken: ${{ secrets.BLOB_BUILDS_API_TOKEN }} + file: ./target/FoxyMachines.jar + releaseNotes: ${{ github.event.head_commit.message }} \ No newline at end of file diff --git a/README.md b/README.md index 124804f..0e04783 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ FoxyMachines adds various machines and tools to [Slimefun](https://github.com/Sl ### Requires at least Java 16! -### [Download](https://thebusybiscuit.github.io/builds/GallowsDove/FoxyMachines/master/) -[![Build Status](https://thebusybiscuit.github.io/builds/GallowsDove/FoxyMachines/master/badge.svg)](https://thebusybiscuit.github.io/builds/GallowsDove/FoxyMachines/master) +### [Download](https://blob.build/project/FoxyMachines) +[![Build Status](https://img.shields.io/badge/build-latest-brightgreen.svg)](https://blob.build/project/FoxyMachines) #### Unwanted items can be disabled in items.yml diff --git a/pom.xml b/pom.xml index 7aafb97..44193f6 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ - ${project.name} v${project.version} + ${project.name} clean package ${basedir}/src/main/java @@ -116,7 +116,7 @@ com.github.Slimefun Slimefun4 - f0ac184c5b + RC-37 provided diff --git a/src/main/java/me/gallowsdove/foxymachines/FoxyMachines.java b/src/main/java/me/gallowsdove/foxymachines/FoxyMachines.java index 296cdcf..4d5ed85 100644 --- a/src/main/java/me/gallowsdove/foxymachines/FoxyMachines.java +++ b/src/main/java/me/gallowsdove/foxymachines/FoxyMachines.java @@ -4,6 +4,7 @@ import io.github.mooy1.infinitylib.common.Scheduler; import io.github.mooy1.infinitylib.core.AbstractAddon; import io.github.mooy1.infinitylib.metrics.bukkit.Metrics; +import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.BlobBuildUpdater; import lombok.SneakyThrows; import me.gallowsdove.foxymachines.abstracts.AbstractWand; import me.gallowsdove.foxymachines.abstracts.CustomBoss; @@ -72,6 +73,11 @@ public void enable() { getAddonCommand().addSub(new KillallCommand()).addSub((new QuestCommand())). addSub(new SacrificialAltarCommand()).addSub(new SummonCommand()).addSub(new ListallCommand()); + + if (getConfig().getBoolean("auto-update") && getDescription().getVersion().startsWith("Dev - ")) { + BlobBuildUpdater updater = new BlobBuildUpdater(this, this.getFile(), "FoxyMachines", "Dev"); + updater.start(); + } } @SneakyThrows