mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-03-11 17:25:32 +00:00
updated release.yml
This commit is contained in:
parent
bd068641f1
commit
85a2c6f411
2 changed files with 124 additions and 83 deletions
205
.github/workflows/release.yml
vendored
205
.github/workflows/release.yml
vendored
|
|
@ -10,7 +10,6 @@ concurrency:
|
|||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
build-and-release-android-apks:
|
||||
permissions:
|
||||
contents: write
|
||||
|
|
@ -22,11 +21,11 @@ jobs:
|
|||
- name: setup flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
channel: "stable"
|
||||
|
||||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
|
||||
- name: Setup Java toolchain (Only Android target)
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
|
|
@ -36,7 +35,7 @@ jobs:
|
|||
- name: Setup cmake
|
||||
uses: jwlawson/actions-setup-cmake@v2
|
||||
with:
|
||||
cmake-version: '3.18.1'
|
||||
cmake-version: "3.18.1"
|
||||
|
||||
- name: Setup ninja
|
||||
uses: seanmiddleditch/gha-setup-ninja@master
|
||||
|
|
@ -84,14 +83,13 @@ jobs:
|
|||
- name: setup flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
|
||||
channel: "stable"
|
||||
|
||||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Install the CLI tool
|
||||
run: cargo install 'flutter_rust_bridge_codegen'
|
||||
|
||||
|
||||
- name: flutter pub get
|
||||
run: flutter pub get
|
||||
|
|
@ -130,14 +128,13 @@ jobs:
|
|||
- name: setup flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
channel: "stable"
|
||||
|
||||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Install the CLI tool
|
||||
run: cargo install 'flutter_rust_bridge_codegen'
|
||||
|
||||
|
||||
- name: flutter pub get
|
||||
run: flutter pub get
|
||||
|
|
@ -174,7 +171,7 @@ jobs:
|
|||
- name: setup flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
channel: "stable"
|
||||
|
||||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
|
@ -185,29 +182,40 @@ jobs:
|
|||
- name: flutter pub get
|
||||
run: flutter pub get
|
||||
|
||||
- name: Enable dart_distributor
|
||||
run: dart pub global activate flutter_distributor
|
||||
- name: Enable inno_bundle
|
||||
run: dart pub global activate inno_bundle
|
||||
|
||||
- name: Update PATH
|
||||
run: echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> ~/.bashrc
|
||||
|
||||
- name: build windows
|
||||
- name: build windows exe
|
||||
run: |
|
||||
flutter_distributor package --platform windows --targets zip --artifact-name 'Mangayomi-${{ github.ref_name }}-windows.zip'
|
||||
dart run inno_bundle:build --release
|
||||
cd build/windows/x64/installer/Release
|
||||
Rename-Item -Path "*-Installer.exe" -NewName "Mangayomi-${{ github.ref_name }}-windows.exe"
|
||||
|
||||
- name: build windows zip
|
||||
run: |
|
||||
cd build/windows/x64/runner/Release
|
||||
Compress-Archive -Path * -DestinationPath Mangayomi-Windows.zip
|
||||
Rename-Item -Path "Mangayomi-*.zip" -NewName "Mangayomi-${{ github.ref_name }}-windows.zip"
|
||||
|
||||
- name: upload artifact windows zip
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Mangayomi-${{ github.ref_name }}-windows-zip
|
||||
path: dist/**/Mangayomi-*.zip
|
||||
path: |
|
||||
build/windows/x64/installer/Release/Mangayomi-*.exe
|
||||
build/windows/x64/runner/Release/Mangayomi-*.zip
|
||||
|
||||
- name: release package windows zip
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: dist/**/Mangayomi-*.zip
|
||||
artifacts: |
|
||||
build/windows/x64/installer/Release/Mangayomi-*.exe
|
||||
build/windows/x64/runner/Release/Mangayomi-*.zip
|
||||
allowUpdates: true
|
||||
|
||||
|
||||
build-and-release-linux-zip:
|
||||
permissions:
|
||||
contents: write
|
||||
|
|
@ -219,12 +227,15 @@ jobs:
|
|||
- 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
|
||||
sudo apt-get install webkit2gtk-4.1 clang cmake ninja-build pkg-config libgtk-3-dev mpv libmpv-dev dpkg-dev libblkid-dev liblzma-dev fuse rpm
|
||||
wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/latest/download/appimagetool-x86_64.AppImage"
|
||||
chmod +x appimagetool
|
||||
sudo mv appimagetool /usr/local/bin/
|
||||
|
||||
- name: setup flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
channel: "stable"
|
||||
|
||||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
|
@ -236,23 +247,109 @@ jobs:
|
|||
run: flutter pub get
|
||||
|
||||
- name: build linux
|
||||
run: flutter build linux
|
||||
- name: Zip
|
||||
run: flutter build linux --release
|
||||
|
||||
- name: Zip
|
||||
uses: thedoctor0/zip-release@master
|
||||
with:
|
||||
type: "zip"
|
||||
filename: Mangayomi-${{ github.ref_name }}-linux.zip
|
||||
directory: build/linux/x64/release/bundle
|
||||
|
||||
|
||||
- name: Create AppImage
|
||||
run: |
|
||||
# Create fresh AppDir structure
|
||||
rm -rf AppDir
|
||||
mkdir -p AppDir/usr/bin
|
||||
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
|
||||
# Copy built files
|
||||
cp -r build/linux/x64/release/bundle/* AppDir/usr/bin/
|
||||
cp assets/app_icons/icon-red.png AppDir/usr/share/icons/hicolor/256x256/apps/mangayomi.png
|
||||
cp assets/app_icons/icon-red.png AppDir/mangayomi.png
|
||||
# Create desktop file in AppDir root
|
||||
cat <<EOF > AppDir/mangayomi.desktop
|
||||
[Desktop Entry]
|
||||
Name=mangayomi
|
||||
Exec=usr/bin/mangayomi
|
||||
Icon=mangayomi
|
||||
Type=Application
|
||||
Categories=Utility;
|
||||
EOF
|
||||
# Create AppRun file
|
||||
cat <<EOF > AppDir/AppRun
|
||||
#!/bin/sh
|
||||
SELF=\$(readlink -f "\$0")
|
||||
HERE=\${SELF%/*}
|
||||
export PATH="\${HERE}/usr/bin/:\${PATH}"
|
||||
export LD_LIBRARY_PATH="\${HERE}/usr/lib/:\${LD_LIBRARY_PATH}"
|
||||
exec "\${HERE}/usr/bin/mangayomi" "\$@"
|
||||
EOF
|
||||
chmod +x AppDir/AppRun
|
||||
# Make AppImage
|
||||
/usr/local/bin/appimagetool AppDir
|
||||
mv $(find . -type f -name "*.AppImage") build/linux/x64/release/Mangayomi-${{ github.ref_name }}-linux.AppImage
|
||||
|
||||
- name: Create RPM Package
|
||||
run: |
|
||||
mkdir -p rpm_build/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||
cp -r build/linux/x64/release/bundle rpm_build/SOURCES/mangayomi-1.0.0
|
||||
tar czf rpm_build/SOURCES/mangayomi-1.0.0.tar.gz -C rpm_build/SOURCES mangayomi-1.0.0
|
||||
mkdir -p rpm_build/SOURCES/usr/share/icons/hicolor/256x256/apps
|
||||
cp assets/app_icons/icon-red.png rpm_build/SOURCES/usr/share/icons/hicolor/256x256/apps/mangayomi.png
|
||||
# RPM Spec File
|
||||
cat <<EOF > rpm_build/SPECS/mangayomi.spec
|
||||
Name: mangayomi
|
||||
Version: 1.0.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Mangayomi is an open-source Flutter app for reading manga, novels, and watching animes across multiple platforms
|
||||
License: MIT
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
BuildArch: x86_64
|
||||
|
||||
%description
|
||||
Mangayomi is an open-source Flutter app for reading manga, novels, and watching animes across multiple platforms.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}/usr/bin
|
||||
mkdir -p %{buildroot}/usr/share/applications
|
||||
mkdir -p %{buildroot}/usr/share/icons/hicolor/256x256/apps
|
||||
cp -r * %{buildroot}/usr/bin/
|
||||
cp -r %{_sourcedir}/usr/share/* %{buildroot}/usr/share/
|
||||
cat <<EOL > %{buildroot}/usr/share/applications/mangayomi.desktop
|
||||
[Desktop Entry]
|
||||
Name=mangayomi
|
||||
Exec=/usr/bin/mangayomi
|
||||
Icon=mangayomi
|
||||
Type=Application
|
||||
Categories=Utility;
|
||||
EOL
|
||||
%files
|
||||
/usr/bin/*
|
||||
/usr/share/applications/mangayomi.desktop
|
||||
/usr/share/icons/hicolor/256x256/apps/mangayomi.png
|
||||
EOF
|
||||
|
||||
rpmbuild --define "_topdir $(pwd)/rpm_build" -ba rpm_build/SPECS/mangayomi.spec
|
||||
mv rpm_build/RPMS/x86_64/*.rpm build/linux/x64/release/Mangayomi-${{ github.ref_name }}-linux.rpm
|
||||
|
||||
- name: upload artifact linux zip
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Mangayomi-${{ github.ref_name }}-limux-zip
|
||||
path: build/linux/x64/release/bundle/Mangayomi-*.zip
|
||||
path: |
|
||||
build/linux/x64/release/bundle/Mangayomi-*.zip
|
||||
build/linux/x64/release/Mangayomi-*.AppImage
|
||||
build/linux/x64/release/Mangayomi-*.rpm
|
||||
- name: release packages linux zip
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: build/linux/x64/release/bundle/Mangayomi-*.zip
|
||||
artifacts: |
|
||||
build/linux/x64/release/bundle/Mangayomi-*.zip
|
||||
build/linux/x64/release/Mangayomi-*.AppImage
|
||||
build/linux/x64/release/Mangayomi-*.rpm
|
||||
allowUpdates: true
|
||||
|
||||
build-and-release-linux-deb:
|
||||
|
|
@ -271,14 +368,14 @@ jobs:
|
|||
- name: setup flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
channel: "stable"
|
||||
|
||||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Install the CLI tool
|
||||
run: cargo install 'flutter_rust_bridge_codegen'
|
||||
|
||||
|
||||
- name: flutter pub get
|
||||
run: flutter pub get
|
||||
|
||||
|
|
@ -305,59 +402,3 @@ jobs:
|
|||
with:
|
||||
artifacts: dist/Mangayomi-*.deb
|
||||
allowUpdates: true
|
||||
|
||||
# build-and-release-linux-appimage:
|
||||
# permissions:
|
||||
# contents: write
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: checkout branch
|
||||
# uses: actions/checkout@v4
|
||||
|
||||
# - 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 libfuse2 locate
|
||||
# wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
|
||||
# chmod +x appimagetool
|
||||
# sudo mv appimagetool /usr/local/bin/
|
||||
|
||||
# - name: setup flutter
|
||||
# uses: subosito/flutter-action@v2
|
||||
# with:
|
||||
# channel: 'stable'
|
||||
|
||||
# - name: Setup Rust toolchain
|
||||
# uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
# - name: Install the CLI tool
|
||||
# run: cargo install 'flutter_rust_bridge_codegen'
|
||||
|
||||
# - name: flutter pub get
|
||||
# run: flutter pub get
|
||||
|
||||
# - name: Enable dart_distributor
|
||||
# run: dart pub global activate flutter_distributor
|
||||
|
||||
# - name: Update PATH
|
||||
# run: echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> ~/.bashrc
|
||||
|
||||
# - name: Build AppImage package
|
||||
# run: flutter_distributor package --platform linux --targets appimage
|
||||
|
||||
# - name: Rebuild AppImage package
|
||||
# run: flutter_distributor package --platform linux --targets appimage
|
||||
|
||||
# - name: Move AppImage file
|
||||
# run: mv $(find dist -type f -name "mangayomi*.AppImage") dist/Mangayomi-${{ github.ref_name }}-linux.AppImage
|
||||
|
||||
# - name: upload artifact linux AppImage
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# path: dist/Mangayomi-*.AppImage
|
||||
|
||||
# - name: Release package AppImage
|
||||
# uses: ncipollo/release-action@v1
|
||||
# with:
|
||||
# artifacts: dist/Mangayomi-*.AppImage
|
||||
# allowUpdates: true
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="mangayomi" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="flutter_deeplinking_enabled" android:value="false" />
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
|
|
@ -55,5 +54,6 @@
|
|||
<meta-data
|
||||
android:name="io.flutter.embedding.android.EnableImpeller"
|
||||
android:value="false" />
|
||||
<meta-data android:name="flutter_deeplinking_enabled" android:value="false" />
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
|
|||
Loading…
Reference in a new issue