Skip to content

Commit

Permalink
ci: setup blob build
Browse files Browse the repository at this point in the history
  • Loading branch information
ybw0014 committed Dec 21, 2023
1 parent e557e59 commit b3e9f74
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/blob-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Blob Build

on:
push:
branches:
- master

jobs:
build:
if: startsWith(github.event.head_commit.message, '[CI skip]') == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 16
uses: actions/setup-java@v4
with:
java-version: 16
distribution: temurin
- name: Build with Maven
run: mvn package --file pom.xml
- name: Upload to Blob Builds
uses: WalshyDev/blob-builds/gh-action@main
with:
project: FastMachines
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 @@ -99,7 +99,7 @@
<dependency>
<groupId>com.github.Slimefun</groupId>
<artifactId>Slimefun4</artifactId>
<version>bbfb9734b9</version>
<version>RC-36</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/net/guizhanss/fastmachines/FastMachines.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import org.bukkit.plugin.Plugin;

import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.GitHubBuildsUpdater;
import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.BlobBuildUpdater;

import net.guizhanss.fastmachines.core.services.IntegrationService;
import net.guizhanss.fastmachines.core.services.LocalizationService;
Expand Down Expand Up @@ -104,8 +104,7 @@ private void setupMetrics() {
@Override
protected void autoUpdate() {
if (getPluginVersion().startsWith("Dev")) {
String path = getGithubUser() + "/" + getGithubRepo() + "/" + getGithubBranch();
new GitHubBuildsUpdater(this, getFile(), path).start();
new BlobBuildUpdater(this, getFile(), getGithubRepo()).start();
} else if (getPluginVersion().startsWith("Build")) {
try {
// use updater in lib plugin
Expand Down

0 comments on commit b3e9f74

Please sign in to comment.