mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 16:18:22 +08:00
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@@ -49,7 +49,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
android:
|
android:
|
||||||
if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_android == 'true' }}
|
if: ${{ (github.event_name == 'pull_request' && github.repository == 'bggRGjQaUbCoE/PiliPlus') || github.event.inputs.build_android == 'true' }}
|
||||||
name: Release Android
|
name: Release Android
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
@@ -95,12 +95,24 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Set and Extract version
|
- name: Set and Extract version
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: lib/scripts/build.ps1 android
|
run: lib/scripts/build.ps1 android
|
||||||
|
|
||||||
- name: Flutter Build Apk
|
- name: Flutter Build Release Apk
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
run: flutter build apk --release --split-per-abi --dart-define-from-file=pili_release.json --pub
|
run: flutter build apk --release --split-per-abi --dart-define-from-file=pili_release.json --pub
|
||||||
|
|
||||||
|
- name: Flutter Build Dev Apk
|
||||||
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.SIGN_KEYSTORE_BASE64_DEV }}" | base64 --decode > android/app/dev.jks
|
||||||
|
echo storeFile='dev.jks' >> android/key.properties
|
||||||
|
echo storePassword='${{ secrets.KEYSTORE_PASSWORD_DEV }}' >> android/key.properties
|
||||||
|
echo keyAlias='${{ secrets.KEY_ALIAS_DEV }}' >> android/key.properties
|
||||||
|
echo keyPassword='${{ secrets.KEY_PASSWORD_DEV }}' >> android/key.properties
|
||||||
|
flutter build apk --release --split-per-abi --android-project-arg dev=1 --pub
|
||||||
|
|
||||||
- name: Rename
|
- name: Rename
|
||||||
run: |
|
run: |
|
||||||
for file in build/app/outputs/flutter-apk/app-*-release.apk; do
|
for file in build/app/outputs/flutter-apk/app-*-release.apk; do
|
||||||
@@ -139,7 +151,7 @@ jobs:
|
|||||||
path: PiliPlus_android_*_x86_64.apk
|
path: PiliPlus_android_*_x86_64.apk
|
||||||
|
|
||||||
ios:
|
ios:
|
||||||
if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_ios == 'true' }}
|
if: ${{ (github.event_name == 'pull_request' && github.repository == 'bggRGjQaUbCoE/PiliPlus') || github.event.inputs.build_ios == 'true' }}
|
||||||
uses: ./.github/workflows/ios.yml
|
uses: ./.github/workflows/ios.yml
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
with:
|
with:
|
||||||
@@ -153,7 +165,7 @@ jobs:
|
|||||||
tag: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || '' }}
|
tag: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || '' }}
|
||||||
|
|
||||||
win_x64:
|
win_x64:
|
||||||
if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_win_x64 == 'true' }}
|
if: ${{ (github.event_name == 'pull_request' && github.repository == 'bggRGjQaUbCoE/PiliPlus') || github.event.inputs.build_win_x64 == 'true' }}
|
||||||
uses: ./.github/workflows/win_x64.yml
|
uses: ./.github/workflows/win_x64.yml
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -54,6 +54,14 @@ android {
|
|||||||
signingConfig = config ?: signingConfigs["debug"]
|
signingConfig = config ?: signingConfigs["debug"]
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
|
if (project.hasProperty("dev")) {
|
||||||
|
applicationIdSuffix = ".dev"
|
||||||
|
resValue(
|
||||||
|
type = "string",
|
||||||
|
name = "app_name",
|
||||||
|
value = "PiliPlus dev",
|
||||||
|
)
|
||||||
|
}
|
||||||
proguardFiles(
|
proguardFiles(
|
||||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
"proguard-rules.pro"
|
"proguard-rules.pro"
|
||||||
|
|||||||
Reference in New Issue
Block a user