Merge pull request #36 from ToC-Taiwan/dev-20240215 #40
This file contains hidden or 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: Deploy to Play Store | |
on: | |
push: | |
branches: | |
- main | |
permissions: read-all | |
jobs: | |
fastlane-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Flutter repository with stable channel | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- run: flutter doctor -v | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- run: | | |
./scripts/flutter_clean.sh | |
dart ./scripts/gen_version.dart | |
- name: Setup Fastlane | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.3" | |
bundler-cache: true | |
working-directory: android | |
- name: Configure Keystore | |
run: | | |
echo "$PLAY_STORE_UPLOAD_KEY" | base64 --decode > app/upload-keystore.jks | |
echo "storeFile=upload-keystore.jks" >> key.properties | |
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties | |
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties | |
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> 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 }} | |
working-directory: android | |
- run: bundle exec fastlane deploy | |
env: | |
PLAY_STORE_CONFIG_JSON: ${{ secrets.PLAY_STORE_CONFIG_JSON }} | |
working-directory: android |