fix navBarTitle not appearing on initial startup #178
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
release: | |
types: [created] | |
push: | |
branches: [master] | |
env: | |
JAVA_VERSION: "17.x" | |
FLUTTER_CHANNEL: "stable" | |
PROPERTIES_PATH: "./android/key.properties" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Setup Java environment in order to build the Android app. | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{env.JAVA_VERSION}} | |
cache: 'gradle' | |
# Setup the flutter environment. | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: ${{env.FLUTTER_CHANNEL}} | |
cache: true | |
# Generate keystore | |
- uses: timheuer/[email protected] | |
id: android_keystore | |
with: | |
fileName: upload-keystore.jks | |
encodedString: ${{ secrets.KEYSTORE_BASE64 }} | |
# Create key.properties | |
- run: | | |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > ${{env.PROPERTIES_PATH}} | |
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> ${{env.PROPERTIES_PATH}} | |
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> ${{env.PROPERTIES_PATH}} | |
echo "keyAlias=upload" >> ${{env.PROPERTIES_PATH}} | |
# Set build number | |
- run: | | |
sed -i 's/^\(version: [0-9\.]\{1,\}\(-[a-z]\{1,\}\)\{0,1\}\)$/\1+${{ github.run_number }}/m' pubspec.yaml | |
# No dart analytics. | |
- run: dart --disable-analytics | |
# No flutter analytics. | |
- run: flutter config --no-analytics | |
# Get flutter dependencies. | |
- run: flutter pub get | |
# Check for any formatting issues in the code. | |
- run: dart format --set-exit-if-changed . | |
# Statically analyze the Dart code for any errors. | |
- run: dart analyze . | |
# Run widget tests for our flutter project. | |
# - run: flutter test | |
# Build apk. | |
- run: flutter build apk --obfuscate --split-debug-info=build/app/outputs/symbols/apk --release --split-per-abi | |
# Build aab | |
- run: flutter build appbundle --obfuscate --split-debug-info=build/app/outputs/symbols/aab --release | |
# Zip symbols | |
- uses: montudor/action-zip@v1 | |
- run: zip -qq -r aab-debug-symbols.zip * | |
working-directory: build/app/intermediates/merged_native_libs/release/out/lib/ | |
# Upload generated apk to the artifacts. | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: app-arm64-v8a-release.apk | |
path: build/app/outputs/apk/release/app-arm64-v8a-release.apk | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: app-armeabi-v7a-release.apk | |
path: build/app/outputs/apk/release/app-armeabi-v7a-release.apk | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: app-x86_64-release.apk | |
path: build/app/outputs/flutter-apk/app-x86_64-release.apk | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: app-release.aab | |
path: build/app/outputs/bundle/release/app-release.aab | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: aab-debug-symbols.zip | |
path: build/app/intermediates/merged_native_libs/release/out/lib/aab-debug-symbols.zip | |
upload-to-github: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: app-arm64-v8a-release.apk | |
path: ./artifacts | |
- uses: actions/download-artifact@v3 | |
with: | |
name: app-armeabi-v7a-release.apk | |
path: ./artifacts | |
- uses: actions/download-artifact@v3 | |
with: | |
name: app-x86_64-release.apk | |
path: ./artifacts | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
./artifacts/app-arm64-v8a-release.apk | |
./artifacts/app-armeabi-v7a-release.apk | |
./artifacts/app-x86_64-release.apk | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: app-release.aab | |
path: ./artifacts | |
- uses: actions/download-artifact@v3 | |
with: | |
name: aab-debug-symbols.zip | |
path: ./artifacts | |
- uses: r0adkll/upload-google-play@v1 | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.PLAYSTORE_ACCOUNT_KEY }} | |
packageName: com.dreautall.waterflyiii | |
releaseFiles: ./artifacts/app-release.aab | |
debugSymbols: ./artifacts/aab-debug-symbols.zip | |
track: internal | |
status: completed | |
- uses: r0adkll/upload-google-play@v1 | |
if: ${{ startsWith(github.ref, 'refs/tags/') && github.event.release.prerelease }} | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.PLAYSTORE_ACCOUNT_KEY }} | |
packageName: com.dreautall.waterflyiii | |
releaseFiles: ./artifacts/app-release.aab | |
debugSymbols: ./artifacts/aab-debug-symbols.zip | |
track: alpha | |
status: completed | |
- uses: r0adkll/upload-google-play@v1 | |
if: ${{ startsWith(github.ref, 'refs/tags/') && !github.event.release.prerelease }} | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.PLAYSTORE_ACCOUNT_KEY }} | |
packageName: com.dreautall.waterflyiii | |
releaseFiles: ./artifacts/app-release.aab | |
debugSymbols: ./artifacts/aab-debug-symbols.zip | |
track: beta | |
status: completed |