Files
PiliPlus/.github/workflows/android.yml
My-Responsitories a65edab7d1 opt: env (#1510)
* opt: env

* fix

* fix: regex

* fix: android

* fix

* fix

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* fastforge define

* fix

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-10 15:52:26 +08:00

87 lines
2.4 KiB
YAML

name: Android Release
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- "**.md"
workflow_dispatch:
jobs:
android:
runs-on: ubuntu-latest
steps:
- name: 代码迁出
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: 构建Java环境
uses: actions/setup-java@v5
with:
distribution: "zulu"
java-version: "17"
cache: "gradle"
cache-dependency-path: |
android/*.gradle*
android/**/gradle-wrapper.properties
- name: 安装Flutter
uses: subosito/flutter-action@v2
id: flutter-action
with:
channel: stable
flutter-version-file: pubspec.yaml
cache: true
- name: apply bottom sheet patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/bottom_sheet_patch.diff
# - name: 下载项目依赖
# run: flutter pub get
- name: Write key
if: github.event_name != 'pull_request'
run: |
if [ ! -z "${{ secrets.SIGN_KEYSTORE_BASE64 }}" ]; then
echo "${{ secrets.SIGN_KEYSTORE_BASE64 }}" | base64 --decode > android/app/key.jks
echo storeFile='key.jks' >> android/key.properties
echo storePassword='${{ secrets.KEYSTORE_PASSWORD }}' >> android/key.properties
echo keyAlias='${{ secrets.KEY_ALIAS }}' >> android/key.properties
echo keyPassword='${{ secrets.KEY_PASSWORD }}' >> android/key.properties
fi
- name: Set and Extract version
shell: pwsh
run: lib/scripts/build.ps1 android
- name: flutter build apk
run: flutter build apk --release --split-per-abi --dart-define-from-file=pili_release.json --pub
- name: 上传
uses: actions/upload-artifact@v4
with:
name: app-arm64-v8a
path: |
build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
- name: 上传
uses: actions/upload-artifact@v4
with:
name: app-armeabi-v7a
path: |
build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
- name: 上传
uses: actions/upload-artifact@v4
with:
name: app-x86_64
path: |
build/app/outputs/flutter-apk/app-x86_64-release.apk