Build linux binaries (deb, appimage & rpm) #34
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build linux binaries (deb, appimage & rpm) | |
on: workflow_dispatch | |
jobs: | |
build-linux-deb-appimage-rpm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: '3.24.2' | |
- name: Clone project | |
run: | | |
git clone https://github.com/anandnet/Harmony-Music.git | |
cd Harmony-Music && git switch linux_bin_fix | |
- name: Install project dependencies | |
working-directory: ./Harmony-Music | |
run: flutter pub get | |
- name: Update lang data | |
working-directory: ./Harmony-Music | |
run: dart localization/generator.dart | |
- name: Set update check flag to true | |
working-directory: ./Harmony-Music/lib/utils | |
run: echo "const updateCheckFlag = true;" > update_check_flag_file.dart | |
- name: install required deps for linux package | |
run: | | |
sudo apt-get update | |
sudo apt-get install libmpv-dev mpv libayatana-appindicator3-dev ninja-build libgtk-3-dev rpm patchelf locate libfuse2 plocate | |
wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" | |
chmod +x appimagetool && mv appimagetool /usr/local/bin/ | |
- name: Flutter doctor | |
run: flutter doctor | |
- name: Build linux deb, appImage & rpm package | |
working-directory: . | |
run: | | |
git clone https://github.com/anandnet/flutter_distributor.git | |
cd flutter_distributor && dart pub global activate --source path . | |
cd .. && cd ./Harmony-Music | |
flutter_distributor package --platform linux --targets deb | |
flutter_distributor package --platform linux --targets rpm | |
flutter_distributor package "target-platform=linux-x64" --platform linux --targets appimage | |
- name: Upload linux binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Harmony music linux binaries | |
path: ./Harmony-Music/dist/* |