From f815ee880aaf5852e939867ac6cae3c4c76cdd68 Mon Sep 17 00:00:00 2001 From: RobotHanzo <36107150+RobotHanzo@users.noreply.github.com> Date: Sat, 9 Jan 2021 14:57:38 +0800 Subject: [PATCH 1/2] Testing automatic build system --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..622e4182d2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Build + +on: + push: + branches: + - '**' + pull_request: + workflow_dispatch: + inputs: + branch: + description: 'The branch to build' + required: true + default: 'master' + remote: + descriptoin: 'The custom remote link, e.g. https://github.com/Moulberry/NotEnoughUpdates' + required: false +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Alternate origin to user specified + if: ${{ github.event.inputs.remote != '' }} + run: | + git remote remove origin + git remote add origin ${{ github.event.inputs.remote }} + - name: Check out to the branch user specified + if: github.event_name == 'workflow_dispatch' + run: | + git fetch origin + git checkout origin/${{ github.event.inputs.branch }} + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Setup ForgeGradle + run: ./gradlew setupCIWorkspace + - name: Build with Gradle + run: ./gradlew build + - name: Upload mod jar + uses: actions/upload-artifact@v2 + with: + path: build/libs/*.jar From 830571405192a804af9638bd8dda2a88db13ddba Mon Sep 17 00:00:00 2001 From: RobotHanzo <36107150+RobotHanzo@users.noreply.github.com> Date: Sat, 9 Jan 2021 15:01:38 +0800 Subject: [PATCH 2/2] Excluded excessive jars --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 622e4182d2..4f23ccb7af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,4 +43,8 @@ jobs: - name: Upload mod jar uses: actions/upload-artifact@v2 with: - path: build/libs/*.jar + name: NotEnoughUpdates + path: | + build/libs/*.jar + !build/libs/*-dep.jar + !build/libs/*-sources.jar