Skip to content

bardram is pushing to branch and deploying to Google Store #60

bardram is pushing to branch and deploying to Google Store

bardram is pushing to branch and deploying to Google Store #60

name: Upload to Google Store
run-name: ${{github.actor}} is pushing to branch and deploying to Google Store
on:
push:
branches:
- master
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'adopt' # See 'Supported distributions' for available options
java-version: '17'
- name: Cache Flutter
id: cache-flutter
uses: actions/cache@v3
with:
path: |
flutter
~/.pub-cache
key: flutter-${{ hashFiles('**/pubspec.lock') }}
- if: ${{ steps.cache-flutter.outputs.cache-hit != 'true' }}
name: Install Flutter
run: git clone https://github.com/flutter/flutter.git --depth 1 -b stable $FOLDER
- name: Add Flutter to PATH
run: echo "$GITHUB_WORKSPACE/flutter/bin" >> $GITHUB_PATH
- if: ${{ steps.cache-flutter.outputs.cache-hit != 'true' }}
name: Install dependencies
run: flutter pub get
# Setup Ruby, Bundler, and Gemfile dependencies
- name: Setup Fastlane
uses: ruby/setup-ruby@8a45918450651f5e4784b6031db26f4b9f76b251 # v1.150.0
with:
ruby-version: "head"
bundler-cache: true
working-directory: android
- name: Configure Keystore
run: |
echo "$PLAY_STORE_UPLOAD_KEY" | base64 --decode > app/upload-keystore.jks
echo "$PLAY_STORE_CONFIG_JSON" > PLAY_STORE_CONFIG.json
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> key.properties
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties
echo "storeFile=upload-keystore.jks" >> key.properties
env:
PLAY_STORE_UPLOAD_KEY: ${{ secrets.PLAY_STORE_UPLOAD_KEY }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }}
PLAY_STORE_CONFIG_JSON: ${{secrets.PLAY_STORE_CONFIG_JSON}}
working-directory: android
- if: github.ref == 'refs/heads/master'
run: fastlane release
env:
PLAY_STORE_JSON_KEY: PLAY_STORE_CONFIG.json
working-directory: android
- if: github.ref != 'refs/heads/master'
run: fastlane promote_internal_to_closed
env:
PLAY_STORE_JSON_KEY: PLAY_STORE_CONFIG.json
working-directory: android