From 5aa6a16d0c4de232b09aa9bc2789e76be5292d66 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Sun, 15 Dec 2024 14:15:28 -0700 Subject: [PATCH] add actions with paperweight build for now --- .github/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ .gitmodules | 3 +++ build_paperweight.sh | 5 +++++ paperweight | 1 + 4 files changed, 39 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .gitmodules create mode 100755 build_paperweight.sh create mode 160000 paperweight diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..15767bd99 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: Patch and Build + +on: + push: + branches: [ "**" ] + pull_request: + +jobs: + build: + # Only run on PRs if the source branch is on someone else's repo + if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} + runs-on: ubuntu-latest + steps: + - name: Checkout Git Repository + uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '21' + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + - name: Configure Git User Details + run: git config --global user.email "actions@github.com" && git config --global user.name "Github Actions" + - name: build paperweight + run: ./build_paperweight.sh + - name: Apply Patches + run: ./gradlew applyAllPatches --stacktrace + - name: Build + run: ./gradlew build diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..5fd5230fd --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "paperweight"] + path = paperweight + url = https://github.com/PaperMC/paperweight.git diff --git a/build_paperweight.sh b/build_paperweight.sh new file mode 100755 index 000000000..7a77305f1 --- /dev/null +++ b/build_paperweight.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -eou pipefail +git submodule update --init --recursive +cd paperweight +./gradlew pTML diff --git a/paperweight b/paperweight new file mode 160000 index 000000000..2dfd1f140 --- /dev/null +++ b/paperweight @@ -0,0 +1 @@ +Subproject commit 2dfd1f14007826bf04a19b972294f18ddb692a34