Update README.md #24
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: Android CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| # 4. 构建 Release APK | |
| - name: Build Release APK | |
| run: ./gradlew assembleRelease | |
| # 5. 上传 APK 到 Artifact(使用 v4 版本) | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-release.apk | |
| path: app/release/app-release.apk # 根据实际路径调整 | |
| overwrite: true # 关键参数,跳过压缩 |