From 726da5fc284038ced174bd5649e6152054e48e64 Mon Sep 17 00:00:00 2001 From: Ultimate <63293118+UltimateBoi@users.noreply.github.com> Date: Tue, 29 Apr 2025 19:49:52 +0100 Subject: [PATCH 1/4] Create main.yml Build artifacts (triggered on a push to main branch). Will generate a downloadable zip containing the fully build mod jar file ready to load into fabric minecraft --- .github/workflows/main.yml | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..ea9de78 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,46 @@ +name: Build and Upload Artifacts + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + name: Build Fabric Mod + runs-on: ubuntu-latest + + steps: + # Checkout the repository + - name: Checkout repository + uses: actions/checkout@v3 + + # Set up JDK 17 for Minecraft mod development + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + + # Cache Gradle dependencies + - name: Cache Gradle dependencies + uses: actions/cache@v3 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + # Build the mod + - name: Build the mod + run: ./gradlew build + + # Upload build artifacts + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: fabric-mod-build + path: build/libs/*.jar From a09522f6a2f1119681fa6e0373b27db70323afee Mon Sep 17 00:00:00 2001 From: Ultimate <63293118+UltimateBoi@users.noreply.github.com> Date: Tue, 29 Apr 2025 19:51:37 +0100 Subject: [PATCH 2/4] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ea9de78..304dff8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,7 +40,7 @@ jobs: # Upload build artifacts - name: Upload build artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4.6.2 # latest version as of 29/04/25 with: name: fabric-mod-build path: build/libs/*.jar From 9751eee7ff93e5a1e99a66fcf6ce811a8e9213a4 Mon Sep 17 00:00:00 2001 From: Ultimate <63293118+UltimateBoi@users.noreply.github.com> Date: Tue, 29 Apr 2025 19:54:56 +0100 Subject: [PATCH 3/4] Update main.yml JDK version 21 --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 304dff8..9857df2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,10 +19,10 @@ jobs: uses: actions/checkout@v3 # Set up JDK 17 for Minecraft mod development - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'temurin' # Cache Gradle dependencies @@ -40,7 +40,7 @@ jobs: # Upload build artifacts - name: Upload build artifacts - uses: actions/upload-artifact@v4.6.2 # latest version as of 29/04/25 + uses: actions/upload-artifact@v4.6.2 with: name: fabric-mod-build path: build/libs/*.jar From e07fb5d4620c0a118b2a075e939e61ffd769a072 Mon Sep 17 00:00:00 2001 From: Ultimate <63293118+UltimateBoi@users.noreply.github.com> Date: Wed, 7 May 2025 22:01:05 +0100 Subject: [PATCH 4/4] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9857df2..f57f0ad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - # Set up JDK 17 for Minecraft mod development + # Set up JDK 21 for fabric mod development - name: Set up JDK 21 uses: actions/setup-java@v3 with: