Skip to content

Merge pull request #4 from vicolo-dev/fdroid #34

Merge pull request #4 from vicolo-dev/fdroid

Merge pull request #4 from vicolo-dev/fdroid #34

Workflow file for this run

name: Android Release
# 1
on:
# 2
push:
tags:
- '*'
# 3
workflow_dispatch:
# 4
jobs:
# 5
build:
# 6
runs-on: ubuntu-latest
permissions: write-all
# 7
steps:
# 8
- uses: actions/checkout@v3
with:
fetch-depth: 0
# 9
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: "17"
cache: 'gradle'
# 10
- uses: subosito/flutter-action@v2
with:
# 11
flutter-version: "3.16.3"
channel: 'stable'
cache: true
- name: Create key.properties
run: |
echo keyPassword=\${{ secrets.KEY_PASSWORD }} > ./android/key.properties
echo storePassword=\${{ secrets.KEY_STORE_PASSWORD }} >> ./android/key.properties
echo keyAlias=\${{ secrets.KEY_ALIAS }} >> ./android/key.properties
- name: Load key
run: echo "${{ secrets.KEYSTORE_JKS_RELEASE }}" | base64 --decode > android/app/release-key.jks
- name: Extract version from tag
uses: damienaicheh/[email protected]
- name: Pub Get Packages
run: "flutter pub get"
- name: Build APPBUNDLE
run: "flutter build appbundle"
- name: Build APK
run: "flutter build apk --split-per-abi"
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Github Release
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/bundle/release/*.aab,build/app/outputs/flutter-apk/*.apk"
body: ${{steps.github_release.outputs.changelog}}
# tag: $GIT_TAG_NAME
# token: ${{ secrets.PERSONAL_RELEASE_TOKEN }}
#
# - name: Save APPBUNDLE to Artifacts
# uses: actions/upload-artifact@v2
# with:
# name: APPBUNDLE
# path: build/app/outputs/bundle/release/*.aab