Skip to content

Commit

Permalink
workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
EwyBoy committed Mar 10, 2024
1 parent 5fccc0f commit 765abe0
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: build-artifacts

on: [ push, pull_request ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [forge, neoforge, fabric]

steps:
- uses: actions/checkout@v4

- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Build artifacts
run: ./gradlew clean build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts-${{ matrix.platform }}
path: ${{ matrix.platform }}/build/libs
2 changes: 1 addition & 1 deletion fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ remapJar {
injectAccessWidener = true
inputFile.set(shadowJar.archiveFile)
dependsOn shadowJar
archiveClassifier = null
archiveClassifier = "fabric"
}

jar {
Expand Down
2 changes: 1 addition & 1 deletion forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ shadowJar {
remapJar {
inputFile.set(shadowJar.archiveFile)
dependsOn shadowJar
archiveClassifier.set(null)
archiveClassifier.set("forge")
}

jar {
Expand Down
2 changes: 1 addition & 1 deletion neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ shadowJar {
remapJar {
inputFile.set(shadowJar.archiveFile)
dependsOn shadowJar
archiveClassifier.set(null)
archiveClassifier.set("neoforge")
}

jar {
Expand Down

0 comments on commit 765abe0

Please sign in to comment.