Skip to content

Commit

Permalink
Create build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Wulian233 authored Feb 13, 2024
1 parent ea3dd55 commit 14c5c0d
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build

on: [ pull_request, push, workflow_dispatch ]

jobs:
Build:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'build.gradle') }}
- name: Build with Gradle
run: |
chmod +x gradlew
./gradlew build
- name: Merge Fabric & Forge & NeoForge JARs
run: |
chmod +x gradlew
./gradlew mergeJars
- name: Upload artifacts (fabric)
uses: actions/upload-artifact@v3
with:
name: fabric
path: ${{ github.workspace }}/fabric/build/libs

- name: Upload artifacts (forge)
uses: actions/upload-artifact@v3
with:
name: forge
path: ${{ github.workspace }}/forge/build/libs

- name: Upload artifacts (neoforge)
uses: actions/upload-artifact@v3
with:
name: neoforge
path: ${{ github.workspace }}/neoforge/build/libs

- name: Upload artifacts (Forgix merged jar)
uses: actions/upload-artifact@v3
with:
name: merged
path: ${{ github.workspace }}/build/libs/forgix

0 comments on commit 14c5c0d

Please sign in to comment.