-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58f8d5b
commit c8c7eea
Showing
20 changed files
with
496 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,31 @@ | ||
name: build | ||
|
||
on: [push, pull_request] | ||
on: [ pull_request, push ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java: [ 17 ] | ||
os: [ ubuntu-22.04 ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
|
||
- name: Cache Brachyura directory | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
.brachyura | ||
~/.brachyura | ||
key: ${{ runner.os }}-brachyura-${{ hashFiles('**/Buildscript.java') }} | ||
restore-keys: ${{ runner.os }}-brachyura | ||
|
||
- name: Build with Brachyura | ||
run: java -jar brachyura-bootstrap-0.jar build | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: artifacts | ||
path: build/libs | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Validate gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Setup JDK ${{ matrix.java }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: 'microsoft' | ||
- name: Make gradle wrapper executable | ||
if: ${{ runner.os != 'Windows' }} | ||
run: chmod +x ./gradlew | ||
- name: build | ||
run: ./gradlew build | ||
- name: Capture build artifacts | ||
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Artifacts | ||
path: build/libs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,46 +11,46 @@ jobs: | |
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
|
||
- name: Cache Brachyura directory | ||
uses: actions/cache@v2 | ||
- name: Change wrapper permissions | ||
run: chmod +x ./gradlew | ||
- name: Build artifacts | ||
run: ./gradlew build | ||
- uses: BrycensRanch/read-properties-action@v1 | ||
id: gradle_props | ||
with: | ||
path: | | ||
.brachyura | ||
~/.brachyura | ||
key: ${{ runner.os }}-brachyura-${{ hashFiles('**/Buildscript.java') }} | ||
restore-keys: ${{ runner.os }}-brachyura | ||
|
||
- name: Build with Brachyura | ||
run: java -jar brachyura-bootstrap-0.jar build | ||
|
||
- name: Publish artifacts to CurseForge | ||
uses: Kir-Antipov/[email protected] | ||
file: gradle.properties | ||
all: true | ||
- name: Publish fabric artifacts | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
curseforge-id: 521126 | ||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | ||
|
||
files: build/libs/!(*-@(dev|sources)).jar | ||
files: | | ||
build/libs/${{ steps.gradle_props.outputs.archives_base_name }}-${{ github.event.release.tag_name }}.jar | ||
build/libs/${{ steps.gradle_props.outputs.archives_base_name }}-${{ github.event.release.tag_name }}-sources.jar | ||
version: ${{ github.event.release.tag_name }} | ||
|
||
version-type: beta | ||
loaders: | | ||
fabric | ||
quilt | ||
game-versions: ${{ steps.gradle_props.outputs.minecraft_version_range }} | ||
game-version-filter: releases | ||
|
||
dependencies: | | ||
fabric-api(required){modrinth:P7dR8mSH}{curseforge:306612}#(ignore:github) | ||
cloth-config(required){modrinth:9s6osm5g}{curseforge:348521}#(ignore:github) | ||
fabric-api | ||
cloth-config | ||
java: | | ||
17 | ||
retry-attempts: 2 | ||
retry-delay: 10000 | ||
fail-mode: fail | ||
fail-mode: skip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,26 +11,16 @@ jobs: | |
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
|
||
- name: Cache Brachyura directory | ||
uses: actions/cache@v2 | ||
- name: Change wrapper permissions | ||
run: chmod +x ./gradlew | ||
- name: Build artifacts | ||
run: ./gradlew build | ||
- name: Upload assets to GitHub | ||
uses: AButler/[email protected] | ||
with: | ||
path: | | ||
.brachyura | ||
~/.brachyura | ||
key: ${{ runner.os }}-brachyura-${{ hashFiles('**/Buildscript.java') }} | ||
restore-keys: ${{ runner.os }}-brachyura | ||
|
||
- name: Build with Brachyura | ||
run: java -jar brachyura-bootstrap-0.jar build | ||
|
||
- name: Publish artifacts to GitHub | ||
uses: AButler/[email protected] | ||
with: | ||
files: 'build/libs/*' | ||
repo-token: ${{ secrets.GH_TOKEN }} | ||
files: "build/libs/*" | ||
repo-token: ${{ secrets.GH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,46 +11,46 @@ jobs: | |
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
|
||
- name: Cache Brachyura directory | ||
uses: actions/cache@v2 | ||
- name: Change wrapper permissions | ||
run: chmod +x ./gradlew | ||
- name: Build artifacts | ||
run: ./gradlew build | ||
- uses: BrycensRanch/read-properties-action@v1 | ||
id: gradle_props | ||
with: | ||
path: | | ||
.brachyura | ||
~/.brachyura | ||
key: ${{ runner.os }}-brachyura-${{ hashFiles('**/Buildscript.java') }} | ||
restore-keys: ${{ runner.os }}-brachyura | ||
|
||
- name: Build with Brachyura | ||
run: java -jar brachyura-bootstrap-0.jar build | ||
|
||
- name: Publish artifacts to Modrinth | ||
uses: Kir-Antipov/[email protected] | ||
file: gradle.properties | ||
all: true | ||
- name: Publish fabric artifacts | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
modrinth-id: rI0hvYcd | ||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | ||
|
||
files: build/libs/!(*-@(dev|sources)).jar | ||
files: | | ||
build/libs/${{ steps.gradle_props.outputs.archives_base_name }}-${{ github.event.release.tag_name }}.jar | ||
build/libs/${{ steps.gradle_props.outputs.archives_base_name }}-${{ github.event.release.tag_name }}-sources.jar | ||
version: ${{ github.event.release.tag_name }} | ||
|
||
version-type: beta | ||
loaders: | | ||
fabric | ||
quilt | ||
game-version-filter: releases | ||
game-versions: ${{ steps.gradle_props.outputs.minecraft_version_range }} | ||
game-version-filter: releases | ||
|
||
dependencies: | | ||
fabric-api(required){modrinth:P7dR8mSH}{curseforge:306612}#(ignore:github) | ||
cloth-config(required){modrinth:9s6osm5g}{curseforge:348521}#(ignore:github) | ||
fabric-api | ||
cloth-config | ||
java: | | ||
17 | ||
retry-attempts: 2 | ||
retry-delay: 10000 | ||
fail-mode: fail | ||
fail-mode: skip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
plugins { | ||
id "fabric-loom" version "1.6-SNAPSHOT" | ||
} | ||
|
||
version = project.mod_version | ||
group = project.maven_group | ||
|
||
repositories { | ||
maven { url "https://maven.shedaniel.me/" } //cloth-config | ||
maven { url "https://maven.terraformersmc.com" } //modmenu | ||
} | ||
|
||
dependencies { | ||
minecraft "com.mojang:minecraft:${project.minecraft_version}" | ||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" | ||
|
||
modImplementation "net.fabricmc:fabric-loader:${project.fabric_loader}" | ||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api}" | ||
|
||
modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config}") { exclude(group: "net.fabricmc.fabric-api") } | ||
modApi "com.terraformersmc:modmenu:${project.modmenu_version}" | ||
} | ||
|
||
base { | ||
archivesName = project.archives_base_name | ||
} | ||
|
||
processResources { | ||
def expandProps = [ | ||
"version": rootProject.mod_version, | ||
"minecraft_version_range": rootProject.minecraft_version_range, | ||
] | ||
|
||
filesMatching(["fabric.mod.json"]) { | ||
expand expandProps | ||
} | ||
|
||
inputs.properties(expandProps) | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
it.options.encoding = "UTF-8" | ||
it.options.release = 17 | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
withSourcesJar() | ||
} | ||
|
||
jar { | ||
from("LICENSE") { | ||
rename { "${it}_${project.base.archivesName.get()}"} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.