build linux AppImage workflow
This commit is contained in:
parent
d8b7e31ab0
commit
282400baed
4 changed files with 75 additions and 18 deletions
84
.github/workflows/release.yml
vendored
84
.github/workflows/release.yml
vendored
|
|
@ -11,7 +11,7 @@ concurrency:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build-and-release-android:
|
build-and-release-android-apks:
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -36,7 +36,7 @@ jobs:
|
||||||
git config --global core.longpaths true
|
git config --global core.longpaths true
|
||||||
flutter pub get
|
flutter pub get
|
||||||
|
|
||||||
- name: build android
|
- name: build android apks
|
||||||
run: |
|
run: |
|
||||||
flutter build apk --release --split-per-abi
|
flutter build apk --release --split-per-abi
|
||||||
cd build/app/outputs/flutter-apk
|
cd build/app/outputs/flutter-apk
|
||||||
|
|
@ -44,12 +44,12 @@ jobs:
|
||||||
mv app-armeabi-v7a-release.apk Mangayomi-${{ github.ref_name }}-android-armeabi-v7a.apk
|
mv app-armeabi-v7a-release.apk Mangayomi-${{ github.ref_name }}-android-armeabi-v7a.apk
|
||||||
mv app-x86_64-release.apk Mangayomi-${{ github.ref_name }}-android-x86_64.apk
|
mv app-x86_64-release.apk Mangayomi-${{ github.ref_name }}-android-x86_64.apk
|
||||||
|
|
||||||
- name: upload artifact android
|
- name: upload artifact android apks
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: "build/app/outputs/flutter-apk/Mangayomi-*.apk"
|
path: "build/app/outputs/flutter-apk/Mangayomi-*.apk"
|
||||||
|
|
||||||
- name: release packages android
|
- name: release packages android apks
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
artifacts: "build/app/outputs/flutter-apk/Mangayomi-*.apk"
|
artifacts: "build/app/outputs/flutter-apk/Mangayomi-*.apk"
|
||||||
|
|
@ -87,12 +87,12 @@ jobs:
|
||||||
zip -r app-release.ipa Payload
|
zip -r app-release.ipa Payload
|
||||||
mv app-release.ipa Mangayomi-${{ github.ref_name }}-ios.ipa
|
mv app-release.ipa Mangayomi-${{ github.ref_name }}-ios.ipa
|
||||||
|
|
||||||
- name: upload artifact ios
|
- name: upload artifact ios ipa
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: "build/ios/iphoneos/Mangayomi-*.ipa"
|
path: "build/ios/iphoneos/Mangayomi-*.ipa"
|
||||||
|
|
||||||
- name: release package ios
|
- name: release package ios ipa
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
artifacts: "build/ios/iphoneos/Mangayomi-*.ipa"
|
artifacts: "build/ios/iphoneos/Mangayomi-*.ipa"
|
||||||
|
|
@ -127,12 +127,12 @@ jobs:
|
||||||
brew install create-dmg
|
brew install create-dmg
|
||||||
create-dmg --volname Mangayomi-${{ github.ref_name }}-macos --window-pos 200 120 --window-size 800 450 --icon-size 100 --app-drop-link 600 185 Mangayomi-${{ github.ref_name }}-macos.dmg build/macos/Build/Products/Release/Mangayomi.app
|
create-dmg --volname Mangayomi-${{ github.ref_name }}-macos --window-pos 200 120 --window-size 800 450 --icon-size 100 --app-drop-link 600 185 Mangayomi-${{ github.ref_name }}-macos.dmg build/macos/Build/Products/Release/Mangayomi.app
|
||||||
|
|
||||||
- name: upload artifact macos
|
- name: upload artifact macos dmg
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: "/Users/runner/work/mangayomi/mangayomi/*.dmg"
|
path: "/Users/runner/work/mangayomi/mangayomi/*.dmg"
|
||||||
|
|
||||||
- name: release package macos
|
- name: release package macos dmg
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
artifacts: "/Users/runner/work/mangayomi/mangayomi/*.dmg"
|
artifacts: "/Users/runner/work/mangayomi/mangayomi/*.dmg"
|
||||||
|
|
@ -169,19 +169,19 @@ jobs:
|
||||||
Copy-Item -Filter *.dll -Path windows\* -Destination $DestDir -Force
|
Copy-Item -Filter *.dll -Path windows\* -Destination $DestDir -Force
|
||||||
Compress-Archive $DestDir build\windows\Mangayomi-${{ github.ref_name }}-windows.zip
|
Compress-Archive $DestDir build\windows\Mangayomi-${{ github.ref_name }}-windows.zip
|
||||||
|
|
||||||
- name: upload artifact windows
|
- name: upload artifact windows zip
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: build\windows\Mangayomi-*.zip
|
path: build\windows\Mangayomi-*.zip
|
||||||
|
|
||||||
- name: release package windows
|
- name: release package windows zip
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
artifacts: build\windows\Mangayomi-*.zip
|
artifacts: build\windows\Mangayomi-*.zip
|
||||||
allowUpdates: true
|
allowUpdates: true
|
||||||
|
|
||||||
|
|
||||||
build-and-release-linux-zip:
|
build-and-release-linux_zip:
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -204,21 +204,71 @@ jobs:
|
||||||
- name: flutter pub get
|
- name: flutter pub get
|
||||||
run: flutter pub get
|
run: flutter pub get
|
||||||
|
|
||||||
- name: Build Linux
|
- name: build linux
|
||||||
run: flutter build linux --verbose
|
run: flutter build linux --verbose
|
||||||
- name: Zip
|
- name: Zip
|
||||||
uses: thedoctor0/zip-release@master
|
uses: thedoctor0/zip-release@master
|
||||||
with:
|
with:
|
||||||
type: "zip"
|
type: "zip"
|
||||||
filename: Mangayomi-${{github.ref_name}}-linux.zip
|
filename: Mangayomi-${{ github.ref_name }}-linux.zip
|
||||||
directory: build/linux/x64/release/bundle
|
directory: build/linux/x64/release/bundle
|
||||||
|
|
||||||
- name: upload artifact linux
|
- name: upload artifact linux zip
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: build/linux/x64/release/bundle/Mangayomi-${{github.ref_name}}-linux.zip
|
path: build/linux/x64/release/bundle/Mangayomi-*.zip
|
||||||
- name: release packages linux
|
- name: release packages linux zip
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
artifacts: build/linux/x64/release/bundle/Mangayomi-${{github.ref_name}}-linux.zip
|
artifacts: build/linux/x64/release/bundle/Mangayomi-*.zip
|
||||||
|
allowUpdates: true
|
||||||
|
|
||||||
|
|
||||||
|
build-and-release-linux-appimage:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: checkout branch
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install webkit2gtk-4.1 clang cmake ninja-build pkg-config libgtk-3-dev mpv libmpv-dev dpkg-dev
|
||||||
|
|
||||||
|
- name: setup flutter
|
||||||
|
uses: subosito/flutter-action@v2.10.0
|
||||||
|
with:
|
||||||
|
flutter-version: 3.13.0
|
||||||
|
channel: 'stable'
|
||||||
|
|
||||||
|
- name: flutter pub get
|
||||||
|
run: flutter pub get
|
||||||
|
|
||||||
|
- name: build linux
|
||||||
|
run: |
|
||||||
|
|
||||||
|
sudo apt install -y libfuse2
|
||||||
|
|
||||||
|
curl -JOL https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||||
|
chmod a+x appimagetool-x86_64.AppImage
|
||||||
|
mv appimagetool-x86_64.AppImage appimagetool
|
||||||
|
|
||||||
|
flutter build linux --release
|
||||||
|
|
||||||
|
mv build/linux/x64/release/bundle/{mangayomi,AppRun}
|
||||||
|
cp linux/appimage/* build/linux/x64/release/bundle/
|
||||||
|
./appimagetool build/linux/x64/release/bundle/
|
||||||
|
mv *.AppImage build/Mangayomi-${{ github.ref_name }}-linux.AppImage
|
||||||
|
|
||||||
|
- name: upload artifact linux appimage
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
path: build/Mangayomi-*.AppImage
|
||||||
|
- name: Rrelease packages appimage
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
artifacts: build/Mangayomi-*.AppImage
|
||||||
allowUpdates: true
|
allowUpdates: true
|
||||||
8
linux/appimage/AppRun.desktop
Normal file
8
linux/appimage/AppRun.desktop
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
Terminal=false
|
||||||
|
Name=mangayomi
|
||||||
|
Exec=AppRun %u
|
||||||
|
Icon=AppRun
|
||||||
|
Categories=Utility;
|
||||||
|
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3 KiB |
|
|
@ -39,7 +39,6 @@ static void my_application_activate(GApplication* application) {
|
||||||
#endif
|
#endif
|
||||||
if (use_header_bar) {
|
if (use_header_bar) {
|
||||||
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
|
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
|
||||||
gtk_window_set_icon_from_file(GTK_WINDOW(window),"assets/app_icons/icon-red-48x48.png",NULL);
|
|
||||||
gtk_widget_show(GTK_WIDGET(header_bar));
|
gtk_widget_show(GTK_WIDGET(header_bar));
|
||||||
gtk_header_bar_set_title(header_bar, "Mangayomi");
|
gtk_header_bar_set_title(header_bar, "Mangayomi");
|
||||||
gtk_header_bar_set_show_close_button(header_bar, TRUE);
|
gtk_header_bar_set_show_close_button(header_bar, TRUE);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue