diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..15a9dcf --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,58 @@ +name: Build + +on: + push: + branches: [ "*" ] + pull_request: + branches: [ "*" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: 'gradle' + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + cache: 'gradle' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + + - name: Generate Minecraft client intermediary files + run: | + ./gradlew remapFabric1201ClientMinecraftIntermediary \ + remapFabric1211ClientMinecraftIntermediary \ + remapFabric12110ClientMinecraftIntermediary \ + --no-daemon + + - name: Build with Gradle + run: ./gradlew build --no-daemon + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + if: success() + with: + name: build-artifacts + path: build/libs/*.jar + retention-days: 30 + + - name: Upload build reports + uses: actions/upload-artifact@v4 + if: failure() + with: + name: build-reports + path: build/reports/ + retention-days: 7 diff --git a/gradlew b/gradlew old mode 100644 new mode 100755