Skip to content

Changelog of new release #17

Changelog of new release

Changelog of new release #17

Workflow file for this run

name: "Android, Linux, Web: build & deploy"
on:
push:
tags: ['v*']
jobs:
build_deploy:
name: Build and release Android APK
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Install missing packages
run: |
sudo apt update
sudo apt install -y clang cmake ninja-build pkg-config libgtk-3-dev
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Flutter version
run: flutter --version
- name: Install required dart tools
run: |
dart pub global activate melos
dart pub global activate vector_graphics_compiler
- name: Bootstrap
run: melos bootstrap
# Force canvaskit because of the bug with svg on html
# See: https://github.com/dnfield/flutter_svg/issues/845
- name: Build for Web
run: flutter build web --web-renderer canvaskit
- name: Upload to Firebase Hosting
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CONVERTER_NOW }}'
channelId: live
projectId: converter-now
- name: Build for linux
run: flutter build linux
- name: Tar linux package
run: tar -C build/linux/x64/release/bundle -czf converternow-linux-x64.tar.gz .
- name: Download Android keystore
id: android_keystore
uses: timheuer/base64-to-file@v1
with:
fileName: key.jks
encodedString: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
- name: Create key.properties
run: |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
- name: Build Android App Bundle
run: flutter build appbundle --dart-define=IS_PLAYSTORE=true --obfuscate --split-debug-info=/tmp
- name: Build Android APK files
run: flutter build apk --release --split-per-abi --obfuscate --split-debug-info=/tmp
- name: Release to GitHub
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/flutter-apk/app-*-release.apk,converternow-linux-x64.tar.gz"
token: ${{ secrets.GH_TOKEN }}
tag: ${{ steps.version.outputs.content }}
commit: ${{ github.sha }}
allowUpdates: true #so if you rerun a job it will overwrite the existing files
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Download bundle dependencies
run: |
gem install bundler:2.0.2
bundle config path vendor/bundle
bundle install
- name: Release to Google Play (beta)
env:
SUPPLY_PACKAGE_NAME: ${{ secrets.ANDROID_PACKAGE_NAME }}
SUPPLY_JSON_KEY_DATA: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
run: |
bundle exec fastlane supply \
--aab build/app/outputs/bundle/release/app-release.aab \
--track beta