Skip to content

Commit

Permalink
Merge pull request #179 from Sefiraat/blob_builds
Browse files Browse the repository at this point in the history
Move to blob builds
  • Loading branch information
Sefiraat authored Jun 14, 2024
2 parents b2df5ca + a0729a6 commit 0cd608a
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 17 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/maven.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
name: Java CI
name: Test Build

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master

jobs:
build:

name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]

- name: Set up JDK 16
uses: actions/setup-java@v4
uses: actions/setup-java@v4.2.1
with:
distribution: 'temurin'
java-version: 16
cache: 'maven'
distribution: adopt

- name: Build with Maven
run: mvn package --file pom.xml
run: mvn package
31 changes: 31 additions & 0 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Upload

on:
push:
branches:
- master

jobs:
build:
name: Build and Upload
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '[ci skip]') == false

steps:
- uses: actions/[email protected]

- name: Set up JDK 16
uses: actions/[email protected]
with:
java-version: 16
distribution: adopt

- name: Build with Maven
run: mvn package

- name: Upload to Builds
uses: WalshyDev/blob-builds/gh-action@main
with:
project: SlimeTinker
apiToken: ${{ secrets.BLOB_BUILDS_API_TOKEN }}
releaseNotes: ${{ github.event.head_commit.message }}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.sefiraat</groupId>
<artifactId>networks</artifactId>
<version>MODIFIED_1.2.0</version>
<version>MODIFIED</version>

<distributionManagement>
<repository>
Expand Down
9 changes: 3 additions & 6 deletions src/main/java/io/github/sefiraat/networks/Networks.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import io.github.sefiraat.networks.slimefun.NetworkSlimefunItems;
import io.github.sefiraat.networks.slimefun.network.NetworkController;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.BlobBuildUpdater;
import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.GitHubBuildsUpdater;
import org.bstats.bukkit.Metrics;
import org.bstats.charts.AdvancedPie;
Expand Down Expand Up @@ -59,12 +60,8 @@ public void onEnable() {
}

public void tryUpdate() {
if (getConfig().getBoolean("auto-update")
&& getDescription().getVersion().startsWith("DEV")
) {
String updateLocation = MessageFormat.format("{0}/{1}/{2}", this.username, this.repo, this.branch);
GitHubBuildsUpdater updater = new GitHubBuildsUpdater(this, getFile(), updateLocation);
updater.start();
if (getConfig().getBoolean("auto-update") && getDescription().getVersion().startsWith("Dev")) {
new BlobBuildUpdater(this, getFile(), "Networks", "Dev").start();
}
}

Expand Down

0 comments on commit 0cd608a

Please sign in to comment.