From eca1202b5008ecced60bb0a1ca9559d526f0fb85 Mon Sep 17 00:00:00 2001 From: Grayray75 <69988482+Grayray75@users.noreply.github.com> Date: Thu, 10 Aug 2023 13:58:44 +0200 Subject: [PATCH] Create build workflow --- .github/workflows/build.yml | 25 +++++++++++++++++++++++++ build.gradle | 7 +++++++ 2 files changed, 32 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 0000000..e1ea10d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: Build + +on: [push, pull_request] + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v3 + with: + dotnet-version: "6.0.x" + + - name: Setup JDK + uses: actions/setup-java@v3 + with: + distribution: "temurin" + java-version: "17" + + - name: Build with Gradle + run: ./gradlew.bat build diff --git a/build.gradle b/build.gradle index 528027c..3dc7002 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,14 @@ dependencies { modRuntimeOnly "maven.modrinth:modmenu:7.2.1" } +task buildWinForms(type: Exec) { + workingDir "WinForms/" + commandLine "cmd", "/c", "dotnet build --configuration Release" +} + task copyWinFormsFiles(type: Copy) { + dependsOn(buildWinForms) + from "WinForms/bin/Release/net6.0-windows" into "src/main/resources/assets/cursedsodiumconfig/WinForms" include "*.exe", "*.dll", "*.json"