Merge remote-tracking branch 'origin/multiplatform' into multiplatform #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI - Gradle Build | |
| on: | |
| push: | |
| branches: [ "**" ] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # 关键:修复 Permission denied(并顺带修复可能的 CRLF 问题) | |
| - name: Prepare Gradle Wrapper | |
| shell: bash | |
| run: | | |
| chmod +x ./gradlew | |
| sed -i 's/\r$//' ./gradlew | |
| - name: Setup JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "21" | |
| cache: gradle | |
| # 可选:更安全,防止 wrapper 被篡改(不想要可删) | |
| - name: Validate Gradle Wrapper | |
| uses: gradle/wrapper-validation-action@v2 | |
| - name: Build | |
| run: ./gradlew --no-daemon clean build | |
| # 可选:把构建产物传到 Actions artifacts 里,方便下载排查 | |
| - name: Upload build outputs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-outputs | |
| path: | | |
| **/build/libs/** | |
| **/build/reports/** | |
| if-no-files-found: ignore |