Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 GitHub 构建 HMCLauncher 后构建 HMCL #2893

Merged
merged 6 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/build-launcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions .github/workflows/check-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Check Style
on:
push:
paths:
'**.java'
- '**.java'
pull_request:
paths:
'**.java'
- '**.java'

jobs:
build:
Expand All @@ -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
6 changes: 3 additions & 3 deletions .github/workflows/check-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Check Translations
on:
push:
paths:
'**.properties'
- '**.properties'
pull_request:
paths:
'**.properties'
- '**.properties'

jobs:
build:
Expand All @@ -20,4 +20,4 @@ jobs:
java-version: '11'
java-package: 'jdk+fx'
- name: Check style test
run: ./gradlew checkTranslations
run: ./gradlew checkTranslations --no-daemon
8 changes: 5 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ name: Java CI
on:
push:
paths-ignore:
'**.md'
- '**.md'
- 'HMCLauncher/**'
pull_request:
paths-ignore:
'**.md'
- '**.md'
- 'HMCLauncher/**'

jobs:
build:
Expand All @@ -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 }}
Expand Down