Skip to content

Commit

Permalink
blob-build
Browse files Browse the repository at this point in the history
  • Loading branch information
J3fftw1 committed Jan 25, 2024
1 parent ef79b42 commit b0b9899
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 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: Publish

on:
push:
branches:
- main

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: Netheopoiesis
apiToken: ${{ secrets.BLOB_BUILDS_API_TOKEN }}
file: ./target/Netheopoiesis.jar
releaseNotes: ${{ github.event.head_commit.message }}
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@
<dependency>
<groupId>com.github.Slimefun</groupId>
<artifactId>Slimefun4</artifactId>
<version>b1aae439f3</version>
<version>cd3672c3f2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.github.baked-libs</groupId>
<groupId>com.github.baked-libs.dough</groupId>
<artifactId>dough-api</artifactId>
<version>1.2.0</version>
<version>a2364de77c</version>
<scope>compile</scope>
</dependency>

Expand Down
7 changes: 3 additions & 4 deletions src/main/java/dev/sefiraat/netheopoiesis/Netheopoiesis.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import dev.sefiraat.netheopoiesis.managers.SupportedPluginManager;
import dev.sefiraat.netheopoiesis.managers.TaskManager;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.GitHubBuildsUpdater;
import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.BlobBuildUpdater;
import org.bstats.bukkit.Metrics;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
Expand Down Expand Up @@ -78,9 +78,8 @@ public void onDisable() {
}

public void tryUpdate() {
if (configManager.isAutoUpdate() && getDescription().getVersion().startsWith("DEV")) {
String updateLocation = MessageFormat.format("{0}/{1}/{2}", this.username, this.repo, this.branch);
GitHubBuildsUpdater updater = new GitHubBuildsUpdater(this, getFile(), updateLocation);
if (configManager.isAutoUpdate() && getDescription().getVersion().startsWith("DEV -")) {
BlobBuildUpdater updater = new BlobBuildUpdater(this, getFile(), "DEV");
updater.start();
}
}
Expand Down

0 comments on commit b0b9899

Please sign in to comment.