Skip to content

Commit

Permalink
use blob builds with auto updater
Browse files Browse the repository at this point in the history
  • Loading branch information
FN-FAL113 committed Dec 22, 2023
1 parent 8f7ec4b commit 30e5bd6
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 18 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/blob-builds.yml
Original file line number Diff line number Diff line change
@@ -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: RelicsOfCthonia
apiToken: ${{ secrets.BLOB_BUILDS_API_TOKEN }}
releaseNotes: ${{ github.event.head_commit.message }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*.ipr
*.iws

# vs code
*.vscode

# IntelliJ
out/

Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Cthonia fell into the hands of the dark, it was succumbed slowly transforming th
As an adventurer, you take part in the discovery of these ancient relics and pursue the fortune that lies beyond.

## :arrow_down: Download from build page with auto updates
### [Download Official Jar](https://thebusybiscuit.github.io/builds/FN-FAL113/RelicsOfCthonia/main/)
[![Build Status](https://thebusybiscuit.github.io/builds/FN-FAL113/RelicsOfCthonia/main/badge.svg)](https://thebusybiscuit.github.io/builds/FN-FAL113/RelicsOfCthonia/main)
### [Download Official Jar](https://blob.build/project/RelicsOfCthonia)


## 💫 Categories
<div align="center">
Expand Down Expand Up @@ -59,7 +59,15 @@ As an adventurer, you take part in the discovery of these ancient relics and pur
<p>This plugin is high configurable in terms of drop rates, where do the relics drop (blocks or in mobs) and the amount of piglin rewards you receive from a successfull barter per each relic. You can add additional item drop rewards or where to drop relic in the fields or remove them at your own disposal. Item rewards support slimefun and vanilla items using the appropriate item ID. <br>You can also generate random config templates by deleting the relic-settings.yml file.</p>
</div>

## 💖 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!</br>
a donation button (currently using parent's paypal due to my pending account requirements).<br/>
<a href="https://www.paypal.com/paypalme/ameliaOrbeta" target=_blank>
<img src="https://raw.githubusercontent.com/stefan-niedermann/paypal-donate-button/master/paypal-donate-button.png" alt="Donate with PayPal" width="40%" />
</a>

## :label: Credits
Huge credits to the custom heads used in this addon which are all from https://minecraft-heads.com/custom-heads
Minecraft-Heads for the head textures used by the addon:<br>
[Visit MC Heads Site](https://minecraft-heads.com/)


60 changes: 49 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ne.fnfal113</groupId>
<artifactId>RelicsOfCthonia</artifactId>
<version>Unofficial-1.7</version>
<version>Unofficial-1.8.0</version>
<packaging>jar</packaging>

<name>RelicsOfCthonia</name>
Expand All @@ -16,23 +16,39 @@
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<url>https://github.com/FN-FAL113</url>

<url>https://github.com/FN-FAL113/RelicsOfCthonia</url>

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

<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>*</include>
<include>json/*</include>
</includes>
</resource>
</resources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>9</source>
<target>9</target>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -41,36 +57,44 @@
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<minimizeJar>true</minimizeJar>
</configuration>
</execution>
</executions>
<configuration>
<!-- shaded packages -->
<relocations>
<relocation>
<pattern>org.bstats</pattern>
<shadedPattern>ne.fnfal113.relicsofcthonia.bstats</shadedPattern>
</relocation>

<relocation>
<pattern>io.github.bakedlibs.dough.updater</pattern>
<shadedPattern>ne.fnfal113.relicsofcthonia.dough.updater</shadedPattern>
</relocation>
<!-- a transitive dependency, necessary for dough-updater -->
<relocation>
<pattern>io.github.bakedlibs.dough.versions</pattern>
<shadedPattern>ne.fnfal113.relicsofcthonia.dough.versions</shadedPattern>
</relocation>
</relocations>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>

<repository>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>

<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
Expand All @@ -92,6 +116,20 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.github.baked-libs.dough</groupId>
<artifactId>dough-updater</artifactId>
<version>4b28bd408e</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.github.baked-libs.dough</groupId>
<artifactId>dough-common</artifactId>
<version>4b28bd408e</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ne.fnfal113.relicsofcthonia;

import io.github.bakedlibs.dough.updater.BlobBuildUpdater;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.GitHubBuildsUpdater;
import ne.fnfal113.relicsofcthonia.config.ConfigManager;
import ne.fnfal113.relicsofcthonia.items.RelicsItemSetup;
import ne.fnfal113.relicsofcthonia.listeners.MiningListener;
Expand Down Expand Up @@ -45,10 +45,9 @@ public void onEnable() {

registerEvents();

if (getConfig().getBoolean("auto-update", true) && getDescription().getVersion().startsWith("DEV - ")) {
new GitHubBuildsUpdater(this, getFile(), "FN-FAL113/RelicsOfCthonia/main").start();
if (getConfig().getBoolean("auto-update", true) && getDescription().getVersion().startsWith("Dev - ")) {
new BlobBuildUpdater(this, getFile(), "RelicsOfCthonia").start();
}

}

public void registerEvents(){
Expand Down

0 comments on commit 30e5bd6

Please sign in to comment.