From 67e96fb84f1426992d68811d553439fc4645f7d5 Mon Sep 17 00:00:00 2001 From: Glavo Date: Tue, 5 Mar 2024 06:28:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20GitHub=20=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=20HMCLauncher=20=E5=90=8E=E6=9E=84=E5=BB=BA=20HMCL=20?= =?UTF-8?q?(#2893)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update * update * test * update * update * update --- .github/workflows/build-launcher.yml | 18 +++++++++++++++++- .github/workflows/check-style.yml | 8 ++++---- .github/workflows/check-translations.yml | 6 +++--- .github/workflows/gradle.yml | 8 +++++--- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-launcher.yml b/.github/workflows/build-launcher.yml index 1ff82d8d4..d0598ff3e 100644 --- a/.github/workflows/build-launcher.yml +++ b/.github/workflows/build-launcher.yml @@ -21,10 +21,26 @@ jobs: msbuild-architecture: x86 - name: Build HMCLauncher run: msbuild /p:Configuration=Release /t:Rebuild /verbosity:detailed .\HMCLauncher\ + - name: Copy HMCLauncher to assets + run: Copy-Item .\HMCLauncher\Release\HMCLauncher.exe -Destination .\HMCL\src\main\resources\assets\HMCLauncher.exe + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '11' + java-package: 'jdk+fx' + - name: Build with Gradle + run: .\gradlew makeExecutables --no-daemon + env: + MICROSOFT_AUTH_ID: ${{ secrets.MICROSOFT_AUTH_ID }} + MICROSOFT_AUTH_SECRET: ${{ secrets.MICROSOFT_AUTH_SECRET }} + CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }} - name: Get short SHA run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 7))" >> $env:GITHUB_ENV + - name: Copy HMCLauncher to libs + run: Copy-Item .\HMCLauncher\Release\HMCLauncher.exe -Destination .\HMCL\build\libs\HMCLauncher.exe - name: Upload Artifacts uses: actions/upload-artifact@v4 with: name: HMCLauncher-${{ env.SHORT_SHA }} - path: HMCLauncher/Release/HMCLauncher.exe + path: HMCL/build/libs/*.exe diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index ff2d3b203..c99873dc8 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -3,10 +3,10 @@ name: Check Style on: push: paths: - '**.java' + - '**.java' pull_request: paths: - '**.java' + - '**.java' jobs: build: @@ -20,6 +20,6 @@ jobs: java-version: '11' java-package: 'jdk+fx' - name: Check style main - run: ./gradlew checkstyleMain + run: ./gradlew checkstyleMain --no-daemon - name: Check style test - run: ./gradlew checkstyleTest + run: ./gradlew checkstyleTest --no-daemon diff --git a/.github/workflows/check-translations.yml b/.github/workflows/check-translations.yml index 59dbe5b95..e28968ea9 100644 --- a/.github/workflows/check-translations.yml +++ b/.github/workflows/check-translations.yml @@ -3,10 +3,10 @@ name: Check Translations on: push: paths: - '**.properties' + - '**.properties' pull_request: paths: - '**.properties' + - '**.properties' jobs: build: @@ -20,4 +20,4 @@ jobs: java-version: '11' java-package: 'jdk+fx' - name: Check style test - run: ./gradlew checkTranslations + run: ./gradlew checkTranslations --no-daemon diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 989db6ce9..ea1428981 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -3,10 +3,12 @@ name: Java CI on: push: paths-ignore: - '**.md' + - '**.md' + - 'HMCLauncher/**' pull_request: paths-ignore: - '**.md' + - '**.md' + - 'HMCLauncher/**' jobs: build: @@ -22,7 +24,7 @@ jobs: java-version: '11' java-package: 'jdk+fx' - name: Build with Gradle - run: ./gradlew build + run: ./gradlew build --no-daemon env: MICROSOFT_AUTH_ID: ${{ secrets.MICROSOFT_AUTH_ID }} MICROSOFT_AUTH_SECRET: ${{ secrets.MICROSOFT_AUTH_SECRET }}