diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..05e7b4d --- /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 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"