mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
chore: Build profile mode when no version tag (#223)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
4371368fda
commit
c561a0be96
1 changed files with 18 additions and 5 deletions
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
|
|
@ -45,7 +45,20 @@ jobs:
|
|||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Decode Keystore
|
||||
- name: Determine Build Type
|
||||
run: |
|
||||
if [[ "${{ startsWith(github.ref, 'refs/tags/v') }}" == "true" ]]; then
|
||||
echo "BUILD_MODE=release" >> $GITHUB_ENV
|
||||
echo "ARTIFACT_SUFFIX=release-signed" >> $GITHUB_ENV
|
||||
echo "AAB_PATH=productionRelease" >> $GITHUB_ENV
|
||||
else
|
||||
echo "BUILD_MODE=profile" >> $GITHUB_ENV
|
||||
echo "ARTIFACT_SUFFIX=production" >> $GITHUB_ENV
|
||||
echo "AAB_PATH=productionProfile" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Decode Keystore for release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
env:
|
||||
ENCODED_STRING: ${{ secrets.KEYSTORE_BASE_64 }}
|
||||
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
|
||||
|
|
@ -84,14 +97,14 @@ jobs:
|
|||
|
||||
- name: Build Android APK and AAB
|
||||
run: |
|
||||
flutter build apk --release --build-number=${{github.run_number}} --flavor production
|
||||
flutter build appbundle --release --build-number=${{github.run_number}} --flavor production
|
||||
flutter build apk --${{ env.BUILD_MODE }} --build-number=${{github.run_number}} --flavor production
|
||||
flutter build appbundle --${{ env.BUILD_MODE }} --build-number=${{github.run_number}} --flavor production
|
||||
|
||||
- name: Rename APK and AAB
|
||||
run: |
|
||||
mkdir -p build/app/outputs/android_artifacts
|
||||
mv build/app/outputs/flutter-apk/app-production-release.apk "build/app/outputs/android_artifacts/release-signed.apk"
|
||||
mv build/app/outputs/bundle/productionRelease/app-production-release.aab "build/app/outputs/android_artifacts/release-signed.aab"
|
||||
mv build/app/outputs/flutter-apk/app-production-${{ env.BUILD_MODE }}.apk "build/app/outputs/android_artifacts/${{ env.ARTIFACT_SUFFIX }}.apk"
|
||||
mv build/app/outputs/bundle/${{ env.AAB_PATH }}/app-production-${{ env.BUILD_MODE }}.aab "build/app/outputs/android_artifacts/${{ env.ARTIFACT_SUFFIX }}.aab"
|
||||
|
||||
- name: Archive Android artifacts
|
||||
uses: actions/upload-artifact@v4.0.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue