mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
Update workflow to build mobile app instead of Android
- Updated default components from 'desktop,android,backend' to 'desktop,mobile,backend' - Replaced Android build job with Flutter mobile build job - Updated release notes to reference Flutter mobile app instead of Android - Updated artifact download and installation instructions for mobile app
This commit is contained in:
@@ -13,7 +13,7 @@ on:
|
||||
components:
|
||||
description: 'Components to release (comma separated)'
|
||||
required: false
|
||||
default: 'desktop,android,backend'
|
||||
default: 'desktop,mobile,backend'
|
||||
type: string
|
||||
|
||||
env:
|
||||
@@ -173,6 +173,15 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
swingmusic-desktop/package-lock.json
|
||||
swingmusic-webclient/package-lock.json
|
||||
|
||||
- name: Rust setup
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
@@ -187,6 +196,11 @@ jobs:
|
||||
- name: Install Tauri CLI
|
||||
run: npm install -g @tauri-apps/cli
|
||||
|
||||
- name: Install webclient dependencies
|
||||
run: |
|
||||
cd swingmusic-webclient
|
||||
npm ci
|
||||
|
||||
- name: Build Desktop App
|
||||
run: |
|
||||
cd swingmusic-desktop
|
||||
@@ -226,6 +240,15 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y mingw-w64 g++-multilib nsis
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
swingmusic-desktop/package-lock.json
|
||||
swingmusic-webclient/package-lock.json
|
||||
|
||||
- name: Rust setup
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
@@ -240,6 +263,11 @@ jobs:
|
||||
- name: Install Tauri CLI
|
||||
run: npm install -g @tauri-apps/cli
|
||||
|
||||
- name: Install webclient dependencies
|
||||
run: |
|
||||
cd swingmusic-webclient
|
||||
npm ci
|
||||
|
||||
- name: Build Desktop App
|
||||
run: |
|
||||
cd swingmusic-desktop
|
||||
@@ -276,6 +304,15 @@ jobs:
|
||||
- name: Initialize submodules
|
||||
run: git submodule update --init --recursive
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
swingmusic-desktop/package-lock.json
|
||||
swingmusic-webclient/package-lock.json
|
||||
|
||||
- name: Rust setup
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
@@ -290,6 +327,11 @@ jobs:
|
||||
- name: Install Tauri CLI
|
||||
run: npm install -g @tauri-apps/cli
|
||||
|
||||
- name: Install webclient dependencies
|
||||
run: |
|
||||
cd swingmusic-webclient
|
||||
npm ci
|
||||
|
||||
- name: Build Desktop App
|
||||
run: |
|
||||
cd swingmusic-desktop
|
||||
@@ -305,49 +347,41 @@ jobs:
|
||||
!swingmusic-desktop/target/${{ matrix.rust_target }}/release/bundle/.*/
|
||||
retention-days: 30
|
||||
|
||||
# Android builds
|
||||
build-android:
|
||||
name: Build Android App
|
||||
# Mobile builds
|
||||
build-mobile:
|
||||
name: Build Mobile App
|
||||
runs-on: ubuntu-latest
|
||||
needs: get-version
|
||||
if: contains(github.event.inputs.components, 'android') || github.event_name == 'push'
|
||||
if: contains(github.event.inputs.components, 'mobile') || github.event_name == 'push'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Initialize submodules
|
||||
run: git submodule update --init --recursive
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
flutter-version: '3.19.6'
|
||||
cache: true
|
||||
cache-key: flutter-${{ hashFiles('**/pubspec.yaml') }}
|
||||
channel: 'stable'
|
||||
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Cache Gradle
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: gradle-
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: cd swingmusic-android && chmod +x gradlew
|
||||
|
||||
- name: Build Android App
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd swingmusic-android
|
||||
./gradlew assembleRelease
|
||||
cd swingmusic_mobile
|
||||
flutter pub get
|
||||
|
||||
- name: Upload Android artifacts
|
||||
- name: Build Mobile App
|
||||
run: |
|
||||
cd swingmusic_mobile
|
||||
flutter build apk --release --no-pub
|
||||
|
||||
- name: Upload Mobile artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: android-release
|
||||
path: swingmusic-android/app/build/outputs/apk/release/*.apk
|
||||
name: mobile-release
|
||||
path: swingmusic_mobile/build/app/outputs/flutter-apk/app-release.apk
|
||||
retention-days: 30
|
||||
|
||||
# Backend builds
|
||||
@@ -377,7 +411,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd src/swingmusic
|
||||
pip install -r requirements.txt
|
||||
pip install -r ../../requirements.txt
|
||||
|
||||
- name: Build Backend Package
|
||||
run: |
|
||||
@@ -396,7 +430,7 @@ jobs:
|
||||
create-release:
|
||||
name: Create Unified Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [get-version, build-linux-desktop, build-windows-desktop, build-macos-desktop, build-android, build-backend]
|
||||
needs: [get-version, build-linux-desktop, build-windows-desktop, build-macos-desktop, build-mobile, build-backend]
|
||||
if: success()
|
||||
|
||||
steps:
|
||||
@@ -418,7 +452,7 @@ jobs:
|
||||
find artifacts -name "*.deb" -exec cp {} release-assets/ \; 2>/dev/null || true
|
||||
find artifacts -name "*.rpm" -exec cp {} release-assets/ \; 2>/dev/null || true
|
||||
|
||||
# Android APK
|
||||
# Mobile APK
|
||||
find artifacts -name "*.apk" -exec cp {} release-assets/ \; 2>/dev/null || true
|
||||
|
||||
# Backend package
|
||||
@@ -461,9 +495,11 @@ jobs:
|
||||
- **Linux**: Choose `.deb`, `.rpm`, or `.AppImage`
|
||||
|
||||
### 📱 Mobile Application
|
||||
- **Android**: Download `.apk` file and install
|
||||
|
||||
### 🔧 Backend Server
|
||||
- **Flutter**: Download `.apk` file and install
|
||||
```bash
|
||||
# Install APK
|
||||
adb install swingmusic-*.apk
|
||||
```
|
||||
- **Python**: Download `.whl` file: `pip install swingmusic-*.whl`
|
||||
- **Source**: Download `.tar.gz` for manual installation
|
||||
|
||||
@@ -504,7 +540,7 @@ jobs:
|
||||
|
||||
## 📋 Components
|
||||
- ✅ **Desktop**: Cross-platform desktop application (4 platforms)
|
||||
- ✅ **Android**: Native Android application
|
||||
- ✅ **Mobile**: Native Flutter application
|
||||
- ✅ **Backend**: Python-based REST API server
|
||||
|
||||
## 🔗 Links
|
||||
|
||||
Reference in New Issue
Block a user