-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git: welp another go at appimage and deb
- Loading branch information
Showing
1 changed file
with
22 additions
and
41 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,8 +144,8 @@ jobs: | |
- name: Install Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ninja-build cmake clang mpv libgtk-3-dev libblkid-dev liblzma-dev pkg-config libmpv-dev webkit2gtk-4.1 dpkg-dev \ | ||
appimagekit-tools | ||
sudo apt-get install -y ninja-build cmake clang mpv libgtk-3-dev libblkid-dev liblzma-dev pkg-config libmpv-dev webkit2gtk-4.1 dpkg-dev | ||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
|
@@ -154,56 +154,37 @@ jobs: | |
- name: Get Dependencies | ||
run: flutter pub get | ||
|
||
- name: Build Linux | ||
run: flutter build linux --release | ||
- 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 .deb Package | ||
run: flutter_distributor package --platform linux --targets deb | ||
|
||
- name: Move .deb file | ||
run: mv $(find dist -type f -name "AnymeX*.deb") build/linux/x64/release/AnymeX-${{ github.ref_name }}.deb | ||
|
||
- name: Build AppImage | ||
run: flutter_distributor package --platform linux --targets AppImage | ||
|
||
- name: Move AppImage file | ||
run: mv $(find dist -type f -name "AnymeX*.AppImage") build/linux/x64/release/AnymeX-${{ github.ref_name }}.AppImage | ||
|
||
- name: Create ZIP for Linux Build | ||
run: | | ||
cd build/linux/x64/release | ||
zip -r ../../../../AnymeX-Linux.zip . | ||
- name: Create AppImage | ||
run: | | ||
mkdir -p AppDir/usr/bin | ||
mkdir -p AppDir/usr/lib | ||
cp build/linux/x64/release/bundle/* AppDir/usr/bin/ | ||
cp /usr/lib/x86_64-linux-gnu/libmpv.so.* AppDir/usr/lib/ | ||
appimagetool AppDir AnymeX.AppImage | ||
mv AnymeX.AppImage build/linux/x64/release/ | ||
- name: Build .deb Package | ||
run: | | ||
VERSION=${{ github.ref_name }} | ||
PACKAGE_NAME="AnymeX " | ||
mkdir -p debian/DEBIAN | ||
mkdir -p debian/usr/bin | ||
mkdir -p debian/usr/share/applications | ||
cp -r build/linux/x64/release/bundle/* debian/usr/bin/ | ||
# Create the control file | ||
cat <<EOF > debian/DEBIAN/control | ||
Package: ${PACKAGE_NAME} | ||
Version: ${VERSION} | ||
Section: base | ||
Priority: optional | ||
Architecture: amd64 | ||
Maintainer: Ryan Yuuki <[email protected]> | ||
Description: Anilist Client | ||
EOF | ||
dpkg-deb --build debian | ||
mv debian.deb build/linux/x64/release/${PACKAGE_NAME}-${VERSION}.deb | ||
- name: Release Linux Builds | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: | | ||
build/linux/x64/release/AnymeX-Linux.zip | ||
build/linux/x64/release/AnymeX.AppImage | ||
build/linux/x64/release/AnymeX-${{ github.ref_name }}.deb | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
build/linux/x64/release/AnymeX-${{ github.ref_name }}.AppImage | ||
build/linux/x64/release/AnymeX-${{ github.ref_name }}.deb | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
allowUpdates: true | ||
tag: ${{ github.ref_name }} | ||
|
||
|