Skip to content

Commit

Permalink
Merge pull request #87 from JustAHuman-xD/feature/new-updater
Browse files Browse the repository at this point in the history
[Feature] Blob Builds
  • Loading branch information
JustAHuman-xD authored Aug 6, 2024
2 parents 184f8d3 + b8b9fea commit 726015e
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 4 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</pluginRepositories>

<build>
<finalName>${project.name} v${project.version}</finalName>
<finalName>${project.name}</finalName>
<defaultGoal>clean package</defaultGoal>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>

Expand Down Expand Up @@ -116,7 +116,7 @@
<dependency>
<groupId>com.github.Slimefun</groupId>
<artifactId>Slimefun4</artifactId>
<version>f0ac184c5b</version>
<version>RC-37</version>
<scope>provided</scope>
</dependency>

Expand Down
6 changes: 6 additions & 0 deletions src/main/java/me/gallowsdove/foxymachines/FoxyMachines.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 726015e

Please sign in to comment.