mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-14 01:37:07 -07:00
Always build signed versions android
This commit is contained in:
parent
beba134716
commit
45337c9847
1 changed files with 9 additions and 23 deletions
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
|
|
@ -20,12 +20,11 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
build_type:
|
build_type:
|
||||||
description: "Build type (release, nightly, or auto)"
|
description: "Build type (release, nightly)"
|
||||||
required: false
|
required: false
|
||||||
default: "auto"
|
default: "nightly"
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- auto
|
|
||||||
- release
|
- release
|
||||||
- nightly
|
- nightly
|
||||||
|
|
||||||
|
|
@ -53,7 +52,7 @@ jobs:
|
||||||
id: check
|
id: check
|
||||||
run: |
|
run: |
|
||||||
# Determine build type based on trigger and input
|
# Determine build type based on trigger and input
|
||||||
if [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ github.event.inputs.build_type }}" != "auto" ]]; then
|
if [[ "${{ github.event_name }}" == "workflow_dispatch"; then
|
||||||
BUILD_TYPE="${{ github.event.inputs.build_type }}"
|
BUILD_TYPE="${{ github.event.inputs.build_type }}"
|
||||||
elif [[ "${{ startsWith(github.ref, 'refs/tags/v') }}" == "true" ]]; then
|
elif [[ "${{ startsWith(github.ref, 'refs/tags/v') }}" == "true" ]]; then
|
||||||
BUILD_TYPE="release"
|
BUILD_TYPE="release"
|
||||||
|
|
@ -128,23 +127,10 @@ jobs:
|
||||||
|
|
||||||
- name: Determine Build Type
|
- name: Determine Build Type
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ needs.fetch-info.outputs.build_type }}" == "release" ]]; then
|
echo "ARTIFACT_SUFFIX=${{ needs.fetch-info.outputs.build_type }}" >> $GITHUB_ENV
|
||||||
echo "BUILD_MODE=release" >> $GITHUB_ENV
|
echo "ARTIFACT_SUFFIX=${{ needs.fetch-info.outputs.build_type }}" >> $GITHUB_OUTPUT
|
||||||
echo "ARTIFACT_SUFFIX=release-signed" >> $GITHUB_ENV
|
|
||||||
echo "AAB_PATH=productionRelease" >> $GITHUB_ENV
|
|
||||||
elif [[ "${{ needs.fetch-info.outputs.build_type }}" == "nightly" ]]; then
|
|
||||||
echo "BUILD_MODE=profile" >> $GITHUB_ENV
|
|
||||||
echo "ARTIFACT_SUFFIX=nightly" >> $GITHUB_ENV
|
|
||||||
echo "AAB_PATH=productionProfile" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "BUILD_MODE=profile" >> $GITHUB_ENV
|
|
||||||
echo "ARTIFACT_SUFFIX=production" >> $GITHUB_ENV
|
|
||||||
echo "AAB_PATH=productionProfile" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
echo "ARTIFACT_SUFFIX=${ARTIFACT_SUFFIX}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Decode Keystore for release
|
- name: Decode Keystore for release
|
||||||
if: needs.fetch-info.outputs.build_type == 'release'
|
|
||||||
env:
|
env:
|
||||||
ENCODED_STRING: ${{ secrets.KEYSTORE_BASE_64 }}
|
ENCODED_STRING: ${{ secrets.KEYSTORE_BASE_64 }}
|
||||||
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
|
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
|
||||||
|
|
@ -183,14 +169,14 @@ jobs:
|
||||||
|
|
||||||
- name: Build Android APK and AAB
|
- name: Build Android APK and AAB
|
||||||
run: |
|
run: |
|
||||||
flutter build apk --${{ env.BUILD_MODE }} --build-number=${{github.run_number}} --flavor production
|
flutter build apk --release --build-number=${{github.run_number}} --flavor production
|
||||||
flutter build appbundle --${{ env.BUILD_MODE }} --build-number=${{github.run_number}} --flavor production
|
flutter build appbundle --release --build-number=${{github.run_number}} --flavor production
|
||||||
|
|
||||||
- name: Rename APK and AAB
|
- name: Rename APK and AAB
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build/app/outputs/android_artifacts
|
mkdir -p build/app/outputs/android_artifacts
|
||||||
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/flutter-apk/app-production-release.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"
|
mv build/app/outputs/bundle/productionRelease/app-production-release.aab "build/app/outputs/android_artifacts/${{ env.ARTIFACT_SUFFIX }}.aab"
|
||||||
|
|
||||||
- name: Archive Android artifacts
|
- name: Archive Android artifacts
|
||||||
uses: actions/upload-artifact@v4.0.0
|
uses: actions/upload-artifact@v4.0.0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue