Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to blob builds #179

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/checkout@v4.1.7

- 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/checkout@v4.1.7

- name: Set up JDK 16
uses: actions/setup-java@v4.2.1
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