Skip to content

Version 4.2.2

Version 4.2.2 #25

Workflow file for this run

name: "Build & deploy for Android, Linux, Web and Windows"
on:
push:
tags: ['v*']
jobs:
build_android:
name: Build and release Android app
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Flutter version
run: flutter --version
- name: Bootstrap
run: |
dart pub global activate melos
melos bootstrap
- 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,build/app/outputs/bundle/release/app-release.aab"
token: ${{ secrets.GH_TOKEN }}
tag: ${{ steps.version.outputs.content }}
commit: ${{ github.sha }}
allowUpdates: true
build_linux:
needs: build_android
name: Build and release Linux app
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install missing packages
run: |
sudo add-apt-repository universe
sudo apt update
sudo apt install -y clang cmake ninja-build pkg-config libgtk-3-dev desktop-file-utils libfuse2
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Flutter version
run: flutter --version
- name: Bootstrap
run: |
dart pub global activate melos
melos bootstrap
- name: Build for linux
run: flutter build linux --release
- name: Tar linux package
run: tar -C build/linux/x64/release/bundle -czf converternow-linux-x64.tar.gz .
- name: Build appimage
run: |
wget https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
mkdir ConverterNOW.AppDir
cp -r build/linux/x64/release/bundle/* ConverterNOW.AppDir
cp assets/app_icons/logo.svg ConverterNOW.AppDir
echo -e '#!/bin/sh\ncd "$(dirname "$0")"\nexec ./converternow' > ConverterNOW.AppDir/AppRun
chmod +x ConverterNOW.AppDir/AppRun
cp snap/gui/converternow.desktop ConverterNOW.AppDir
desktop-file-edit --set-icon="logo" --set-key="Exec" --set-value="converternow %u" ConverterNOW.AppDir/converternow.desktop
./appimagetool-x86_64.AppImage ConverterNOW.AppDir
- name: Release to GitHub
uses: ncipollo/release-action@v1
with:
artifacts: "converternow-linux-x64.tar.gz,Converter_NOW-x86_64.AppImage"
token: ${{ secrets.GH_TOKEN }}
tag: ${{ steps.version.outputs.content }}
commit: ${{ github.sha }}
allowUpdates: true
build_web:
needs: build_linux
name: Build and release Web app
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Flutter version
run: flutter --version
- name: Bootstrap
run: |
dart pub global activate melos
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
build_windows:
needs: build_web
name: Build and release Windows app
runs-on: windows-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- 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
- name: Generate optimized icons (workaround for a bug of melos on Windows)
run: |
dart run vector_graphics_compiler --input-dir assets/app_icons
dart run vector_graphics_compiler --input-dir assets/property_icons
- name: Bootstrap
run: melos bootstrap
- name: Build and create the .msix installer
run: dart run msix:create --store
- name: Release to GitHub
uses: ncipollo/release-action@v1
with:
artifacts: "build/windows/x64/runner/Release/converternow-windows.msix"
token: ${{ secrets.GH_TOKEN }}
tag: ${{ steps.version.outputs.content }}
commit: ${{ github.sha }}
allowUpdates: true