Skip to content

1.1.7+43

1.1.7+43 #109

Workflow file for this run

name: Build and Deploy to Google Play
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2.16.0
- name: Clean build artifacts
run: flutter clean
- name: Set executable permissions for gradlew
run: chmod +x ./android/gradlew
- name: Install Flutter dependencies
run: flutter pub get
- name: Setup Java JDK
uses: actions/setup-java@v4.2.1
with:
distribution: 'temurin'
java-version: '17'
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.4'
- name: Install Bundler
run: gem install bundler
- name: Install Ruby dependencies
run: bundle install
- name: Decode and write Google Play JSON key
run: echo "${{ secrets.GOOGLE_PLAY_JSON_KEY }}" | base64 --decode > android/app/google-play-key.json
- name: Decode and decrypt keystore
env:
ENCRYPTED_KEYSTORE: ${{ secrets.ENCRYPTED_KEYSTORE }}
ENCRYPTION_PASSWORD: ${{ secrets.ENCRYPTION_PASSWORD }}
run: |
echo "${{ secrets.ENCRYPTED_KEYSTORE }}" | base64 --decode > upload-keystore.jks.enc
openssl enc -aes-256-cbc -d -salt -iter 100000 -pbkdf2 -in upload-keystore.jks.enc -out android/app/upload-keystore.jks -k ${{ secrets.ENCRYPTION_PASSWORD }}
- name: Create key.properties
run: |
touch android/key.properties
echo "storeFile=upload-keystore.jks" >> android/key.properties
echo "storePassword=${KEYSTORE_PASSWORD}" >> android/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
- name: Create tourguide.properties
run: |
touch android/tourguide.properties
echo "geoApiKey=${GEO_API_KEY}" >> android/tourguide.properties
env:
GEO_API_KEY: ${{ secrets.GEO_API_KEY }}
- name: Set Flutter SDK Path Environment Variable
run: echo "FLUTTER_SDK_PATH=${{ runner.workspace }}/flutter" >> $GITHUB_ENV
- name: Build and deploy
run: |
cd android
bundle exec fastlane deploy
env:
GOOGLE_PLAY_JSON_KEY: ${{ secrets.GOOGLE_PLAY_JSON_KEY }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}