From 587dd56e627496b5d975d434025b9179a2b27776 Mon Sep 17 00:00:00 2001 From: cnlimiter Date: Wed, 14 Aug 2024 03:22:00 +0800 Subject: [PATCH] platform: move builds and releases to Windows Switch the GitHub Actions workflows to run on Windows instead of Ubuntu. This includes the build, build-pr, and publish workflows, as well as the release job. Additionally, update the gradle and gradlew.bat scripts for consistency with the new platform. --- .github/workflows/build-pr.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/publish.yml | 6 +++--- gradlew | 2 +- gradlew.bat | 22 +++++++++++----------- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 68e7f6fa..378324e9 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -17,7 +17,7 @@ on: jobs: build: name: 'Build PR' - runs-on: ubuntu-latest + runs-on: windows-latest strategy: matrix: loader: [ 'Forge', 'Fabric' ] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 508c6a44..bfabbef3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ permissions: jobs: build: name: 'Build' - runs-on: ubuntu-latest + runs-on: windows-latest strategy: matrix: loader: [ 'Forge', 'Fabric' ] diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 14a6f991..a9bea750 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,7 +19,7 @@ permissions: jobs: build: name: 'Build' - runs-on: ubuntu-latest + runs-on: windows-latest strategy: matrix: loader: [ 'Forge', 'Fabric' ] @@ -52,7 +52,7 @@ jobs: publish: name: 'Publish' - runs-on: ubuntu-latest + runs-on: windows-latest needs: [build] @@ -82,7 +82,7 @@ jobs: release: name: 'Create release' - runs-on: ubuntu-latest + runs-on: windows-latest needs: [build, publish] diff --git a/gradlew b/gradlew index 1aa94a42..31042a67 100644 --- a/gradlew +++ b/gradlew @@ -246,4 +246,4 @@ eval "set -- $( tr '\n' ' ' )" '"$@"' -exec "$JAVACMD" "$@" +exec "$JAVACMD" "$@" \ No newline at end of file diff --git a/gradlew.bat b/gradlew.bat index 93e3f59f..0faad1ae 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -89,4 +89,4 @@ exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal -:omega +:omega \ No newline at end of file