修复播放器报错 #39
Workflow file for this run
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: build-android-Tv | |
| # 推送Tag时触发 或者 手动触发 | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag_name: | |
| description: 'Tag name for the release' | |
| required: false | |
| default: 'v1.0.0' | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| build-android: | |
| runs-on: macos-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| # 签出代码 | |
| - name: 签出代码 | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.inputs.tag_name }} | |
| # APK签名设置 | |
| - name: 下载Android keystore | |
| id: android_keystore | |
| uses: timheuer/base64-to-file@v1.2 | |
| with: | |
| fileName: key.jks | |
| encodedString: ${{ secrets.KEYSTORE_BASE64 }} | |
| - name: 创建key.properties | |
| run: | | |
| echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties | |
| echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> android/key.properties | |
| echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties | |
| echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties | |
| # 设置JAVA环境 | |
| - name: 设置JAVA环境 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: "17" | |
| cache: 'gradle' | |
| # 设置Flutter | |
| - name: 设置Flutter环境 | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| # 更新Flutter的packages | |
| - name: 更新Flutter的packages | |
| run: flutter pub get | |
| # 打包APK | |
| - name: 打包APK | |
| run: flutter build apk --release --split-per-abi --android-skip-build-dependency-validation | |
| # 上传APK至Artifacts | |
| - name: 上传APK至Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android | |
| path: | | |
| build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk | |
| build/app/outputs/flutter-apk/app-arm64-v8a-release.apk | |
| build/app/outputs/flutter-apk/app-x86_64-release.apk | |
| # 读取版本信息 | |
| - name: 读取版本信息 | |
| id: version | |
| uses: juliangruber/read-file-action@v1 | |
| with: | |
| path: assets/version.json | |
| # 上传至Release | |
| # 上传至Release | |
| - name: 上传至Release | |
| uses: softprops/action-gh-release@v2.2.1 | |
| with: | |
| name: ${{ github.event.inputs.tag_name || github.ref_name }} | |
| body: | | |
| 📦 纯粹直播 ${{ github.ref_name }} | |
| 本次更新内容: | |
| ${{ fromJson(steps.version.outputs.content).version_desc }} | |
| 🔗 下载地址:https://github.com/liuchuancong/pure_live_TV/releases/latest | |
| 本软件为开源项目,无广告,无病毒,若安装时出现病毒误报,可自行斟酌。 | |
| 📺 TV 版本 | |
| • 安装程序:支持 Android TV 5.0+ (armeabi-v7a, arm64-v8a) | |
| • 已实现TV同步直播源 | |
| • 支持多种播放器切换 | |
| • 支持弹幕显示 | |
| • 支持应用內更新 | |
| prerelease: false | |
| files: | | |
| build/app/outputs/flutter-apk/app-x86_64-release.apk | |
| build/app/outputs/flutter-apk/app-arm64-v8a-release.apk | |
| build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk | |
| # 完成 | |
| - name: 输出任务状态 | |
| if: always() | |
| run: echo "🍏 Android job's status is ${{ job.status }}." | |