mirror of
https://github.com/gokadzev/Musify.git
synced 2026-03-13 15:20:46 +08:00
65 lines
2.6 KiB
YAML
65 lines
2.6 KiB
YAML
on: workflow_dispatch
|
|
name: Test, Build and Pre Release Fdroid apk
|
|
env:
|
|
PROPERTIES_PATH: './android/key.properties'
|
|
jobs:
|
|
build:
|
|
name: Build APK
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# Setup Java environment in order to build the Android app.
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '17.x'
|
|
|
|
# Gradle cache for faster builds
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
|
|
# Setup the flutter environment.
|
|
- run: |
|
|
pip install -U yq
|
|
echo "FLUTTER_VERSION=$(yq -r .environment.flutter pubspec.yaml | sed 's/\^//g')" >> $GITHUB_ENV
|
|
- uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: 'stable'
|
|
flutter-version: "${{ env.FLUTTER_VERSION }}"
|
|
|
|
#
|
|
- run: |
|
|
echo keyPassword=\${{ secrets.KEY_STORE }} > ${{env.PROPERTIES_PATH}}
|
|
echo storePassword=\${{ secrets.KEY_PASSWORD }} >> ${{env.PROPERTIES_PATH}}
|
|
echo keyAlias=\${{ secrets.KEY_ALIAS }} >> ${{env.PROPERTIES_PATH}}
|
|
#
|
|
- run: echo "${{ secrets.KEYSTORE2 }}" | base64 --decode > android/app/key.jks
|
|
|
|
# Get flutter dependencies.
|
|
- run: flutter pub get
|
|
# # Check for any formatting issues in the code.
|
|
# - run: dart format --set-exit-if-changed .
|
|
# Statically analyze the Dart code for any errors.
|
|
- run: flutter analyze .
|
|
# Build universal apk.
|
|
- run: flutter build apk --release --flavor fdroid -t lib/main_fdroid.dart
|
|
# Release universal Fdroid pre-release apk.
|
|
- uses: svenstaro/upload-release-action@v2
|
|
with:
|
|
repo_name: gokadzev/Musify
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
file: build/app/outputs/flutter-apk/app-fdroid-release.apk
|
|
asset_name: Musify_fdroid.apk
|
|
tag: ${{ github.ref }}
|
|
prerelease: true
|
|
overwrite: true
|
|
body: "**New Musify Fdroid Pre-Release!** \n
|
|
with pre-release / [BETA] builds you have access to the latest build of the app before it is released as stable-release version. Only use pre-release if you test the app, provide feedback, and help us improve its performance. Please note that pre-release versions of the app may be pretty unstable. You may experience crashes, bugs, or other issues while using the app. This is because pre-release version is still in development.
|
|
" |