Skip to content

refactoring

refactoring #254

Workflow file for this run

name: 'Android App'
on:
push:
branches:
- master
workflow_dispatch:
jobs:
multi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.4'
- run: git config --global url."https://".insteadOf git:// # allows dependency downloads without gpg
- run: flutter pub get
- name: "Prepare environment"
run: |
echo '${{ secrets.SEPL_KEYSTORE }}' | base64 -d > android/sepl.keystore
echo '${{ secrets.KEY_PROPERTIES }}' | base64 -d > android/key.properties
echo '${{ secrets.DOT_ENV }}' > .env
v=$(grep -Po 'version: \K.*' pubspec.yaml)
echo "VERSION=$v" >> .env
echo "DISTRIBUTOR=github" >> .env
echo "VERSION=$v" >> $GITHUB_ENV
- name: "Build app"
run: flutter build apk --no-tree-shake-icons
- name: "Create release"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ env.VERSION }}
prerelease: true
title: ${{ env.VERSION }}
files: |
LICENSE
build/app/outputs/flutter-apk/app-release.apk
- name: "Notify devices"
uses: senergy-platform/firebase-cloud-messaging-action@latest
with:
CREDENTIALS: ${{ secrets.FCM_CREDENTIALS }}
MESSAGE: '{"topic": "android", "data": {"type": "release_info"}}'