diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dcd6901..eb5d993 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -89,7 +89,7 @@ jobs: if: runner.os == 'macOS' - name: Install linux dependencies run: | - sudo apt-get install pkg-config libicu-dev libqt5gui5 + sudo apt-get install pkg-config libicu-dev libqt5gui5 libfuse2 export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"; export PATH="/usr/local/opt/icu4c/bin:/usr/local/opt/icu4c/sbin:$PATH" python -m pip install --no-binary=pyicu pyicu @@ -104,6 +104,11 @@ jobs: run: | make dist + - name: build appimage + run: | + make appimage + if: runner.os == 'Linux' + - name: Archive production artifacts uses: actions/upload-artifact@v2 with: @@ -111,6 +116,13 @@ jobs: path: | dist/*.zip + - name: Archive production artifacts - appimage + uses: actions/upload-artifact@v2 + with: + name: "${{ format('ComicTagger-{0}', runner.os) }}" + path: | + dist/*.AppImage + - name: PyTest run: | python -m pytest diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index b7c73f0..f4d3c71 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -74,6 +74,11 @@ jobs: run: | make dist + - name: Build AppImage package + run: | + make appimage + if: runner.os == 'Linux' + - name: Get release name if: startsWith(github.ref, 'refs/tags/') shell: bash @@ -92,3 +97,5 @@ jobs: files: | dist/*.zip dist/*${{ fromJSON('["never", ""]')[runner.os == 'Linux'] }}.whl + dist/*.AppImage + diff --git a/Makefile b/Makefile index 8fe3924..1f44182 100644 --- a/Makefile +++ b/Makefile @@ -61,4 +61,12 @@ $(INSTALL_STAMP): $(PYTHON_VENV) requirements.txt requirements_dev.txt dist: pyinstaller -y comictagger.spec - cd dist && zip -m -r $(FINAL_NAME).zip $(APP_NAME) + cd dist && zip -r $(FINAL_NAME).zip $(APP_NAME) + +appimage: dist + cp -a dist/comictagger dist/appimage + curl -L https://github.com/AppImage/AppImageKit/releases/latest/download/appimagetool-x86_64.AppImage > dist/appimagetool + chmod +x dist/appimagetool + cd dist/appimage/ && ln -s comictaggerlib/graphics/app.png app.png && ln -s comictagger AppRun + sed -e 's|/usr/local/share/comictagger/app.png|app|g' -e 's|%%CTSCRIPT%% %F|./comictagger|g' desktop-integration/linux/ComicTagger.desktop > dist/appimage/AppRun.desktop + cd dist && ./appimagetool appimage