Skip to content

Commit

Permalink
Version Code fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhcjones authored Mar 28, 2024
1 parent e68a6ae commit 98482c9
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ jobs:
with:
flutter-version: '3.19.0'

- name: Set env
if: github.event_name == 'push'
run: |
APP_VERSION=$(echo ${{github.ref_name}} | sed 's/v//g')
echo "APPLICATION_VERSION=$APP_VERSION" >> $GITHUB_ENV
APP_BUILD_BASE=300000000
COMMIT_NUMBER=$(git rev-list HEAD --count)
APP_BUILD_NUMBER=$((APP_BUILD_BASE+COMMIT_NUMBER))
echo "APPLICATION_BUILD_NUMBER=$APP_BUILD_NUMBER" >> $GITHUB_ENV
- name: Build APKs
run: |
flutter config --no-analytics
Expand All @@ -51,19 +41,13 @@ jobs:
mkdir -pv build/app/outputs/release
# Build our big boy APK, and move it into the release APKs folder
if [[ ${{github.event_name}} == 'push' ]]; then
flutter build apk --dart-define=app.flavor=github --release --no-tree-shake-icons --build-name=${{env.APPLICATION_VERSION}} --build-number=${{env.APPLICATION_BUILD_NUMBER}}
else
flutter build apk --dart-define=app.flavor=github --release --no-tree-shake-icons
fi
flutter build apk --dart-define=app.flavor=github --release --no-tree-shake-icons
mv build/app/outputs/apk/release/*.apk build/app/outputs/release
# Build our ABI-specific APKs and move them into the release APKs folder
if [[ ${{github.event_name}} == 'push' ]]; then
flutter build apk --dart-define=app.flavor=github --release --no-tree-shake-icons --split-per-abi --target-platform=android-x64,android-arm,android-arm64 --build-name=${{env.APPLICATION_VERSION}} --build-number=${{env.APPLICATION_BUILD_NUMBER}}
else
flutter build apk --dart-define=app.flavor=github --release --no-tree-shake-icons --split-per-abi --target-platform=android-x64,android-arm,android-arm64
fi
flutter build apk --dart-define=app.flavor=github --release --no-tree-shake-icons --split-per-abi --target-platform=android-x64,android-arm,android-arm64
mv build/app/outputs/apk/release/*.apk build/app/outputs/release
env:
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
Expand Down

0 comments on commit 98482c9

Please sign in to comment.