mirror of
https://github.com/spotiflacapp/SpotiFLAC-Mobile.git
synced 2026-05-31 19:05:05 +07:00
202 lines
5.7 KiB
YAML
202 lines
5.7 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Version tag (e.g., v1.0.0)'
|
|
required: true
|
|
default: 'v1.0.0'
|
|
|
|
jobs:
|
|
build-android:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
version: ${{ steps.get_version.outputs.version }}
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get version
|
|
id: get_version
|
|
run: |
|
|
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
|
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Setup Java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '17'
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.21'
|
|
cache-dependency-path: go_backend/go.sum
|
|
|
|
- name: Install Android SDK & NDK
|
|
uses: android-actions/setup-android@v3
|
|
|
|
- name: Install gomobile
|
|
run: |
|
|
go install golang.org/x/mobile/cmd/gomobile@latest
|
|
gomobile init
|
|
|
|
- name: Build Go backend for Android
|
|
working-directory: go_backend
|
|
run: |
|
|
mkdir -p ../android/app/libs
|
|
gomobile bind -target=android -androidapi 24 -o ../android/app/libs/gobackend.aar .
|
|
env:
|
|
CGO_ENABLED: 1
|
|
|
|
- name: Setup Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: '3.24.0'
|
|
channel: 'stable'
|
|
cache: true
|
|
|
|
- name: Get Flutter dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Generate app icons
|
|
run: dart run flutter_launcher_icons
|
|
|
|
- name: Build APK (Release)
|
|
run: flutter build apk --release
|
|
|
|
- name: Rename APK
|
|
run: |
|
|
VERSION=${{ steps.get_version.outputs.version }}
|
|
mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/SpotiFLAC-${VERSION}-android.apk
|
|
|
|
- name: Upload APK artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: android-apk
|
|
path: build/app/outputs/flutter-apk/SpotiFLAC-*.apk
|
|
|
|
build-ios:
|
|
runs-on: macos-latest
|
|
needs: build-android
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.21'
|
|
cache-dependency-path: go_backend/go.sum
|
|
|
|
- name: Install gomobile
|
|
run: |
|
|
go install golang.org/x/mobile/cmd/gomobile@latest
|
|
gomobile init
|
|
|
|
- name: Build Go backend for iOS
|
|
working-directory: go_backend
|
|
run: |
|
|
mkdir -p ../ios/Frameworks
|
|
gomobile bind -target=ios -o ../ios/Frameworks/Gobackend.xcframework .
|
|
env:
|
|
CGO_ENABLED: 1
|
|
|
|
- name: Setup Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: '3.24.0'
|
|
channel: 'stable'
|
|
cache: true
|
|
|
|
- name: Get Flutter dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Generate app icons
|
|
run: dart run flutter_launcher_icons
|
|
|
|
- name: Build iOS (unsigned)
|
|
run: flutter build ios --release --no-codesign
|
|
|
|
- name: Create IPA
|
|
run: |
|
|
VERSION=${{ needs.build-android.outputs.version }}
|
|
mkdir -p build/ios/ipa
|
|
cd build/ios/iphoneos
|
|
mkdir Payload
|
|
cp -r Runner.app Payload/
|
|
zip -r ../ipa/SpotiFLAC-${VERSION}-ios-unsigned.ipa Payload
|
|
rm -rf Payload
|
|
|
|
- name: Upload IPA artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ios-ipa
|
|
path: build/ios/ipa/SpotiFLAC-*.ipa
|
|
|
|
create-release:
|
|
runs-on: ubuntu-latest
|
|
needs: [build-android, build-ios]
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download Android APK
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: android-apk
|
|
path: ./release
|
|
|
|
- name: Download iOS IPA
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: ios-ipa
|
|
path: ./release
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
tag_name: ${{ needs.build-android.outputs.version }}
|
|
name: SpotiFLAC ${{ needs.build-android.outputs.version }}
|
|
body: |
|
|
## SpotiFLAC ${{ needs.build-android.outputs.version }}
|
|
|
|
Download Spotify tracks in FLAC quality from Tidal, Qobuz & Amazon Music.
|
|
|
|
### Downloads
|
|
- **Android**: `SpotiFLAC-${{ needs.build-android.outputs.version }}-android.apk`
|
|
- **iOS**: `SpotiFLAC-${{ needs.build-android.outputs.version }}-ios-unsigned.ipa` (requires sideloading)
|
|
|
|
### Features
|
|
- Search Spotify tracks, albums, and playlists
|
|
- Download in FLAC quality from multiple sources
|
|
- Automatic fallback to available services
|
|
- Embedded metadata and cover art
|
|
- Lyrics support (synced and plain)
|
|
- Material 3 Expressive UI with dynamic colors
|
|
|
|
### Installation
|
|
**Android**: Enable "Install from unknown sources" and install the APK
|
|
**iOS**: Use AltStore, Sideloadly, or similar tools to sideload the IPA
|
|
|
|
---
|
|
*Note: iOS IPA is unsigned and requires sideloading*
|
|
files: |
|
|
./release/*
|
|
draft: false
|
|
prerelease: false
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|