mirror of
https://github.com/ciromattia/kcc
synced 2026-10-06 17:42:32 +00:00
106 lines
2.8 KiB
YAML
106 lines
2.8 KiB
YAML
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
|
|
name: build KCC for Linux
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
# Don't trigger if it's just a documentation update
|
|
paths-ignore:
|
|
- '**.md'
|
|
- '**.MD'
|
|
- '**.yml'
|
|
- '**.sh'
|
|
- 'docs/**'
|
|
- 'Dockerfile'
|
|
- 'LICENSE'
|
|
- '.gitattributes'
|
|
- '.gitignore'
|
|
- '.dockerignore'
|
|
|
|
jobs:
|
|
build-appimage:
|
|
name: Build AppImage (${{ matrix.arch }})
|
|
runs-on: ${{ matrix.runs-on }}
|
|
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- runs-on: ubuntu-latest
|
|
arch: x86_64
|
|
- runs-on: ubuntu-24.04-arm
|
|
arch: aarch64
|
|
|
|
container: ghcr.io/pkgforge-dev/archlinux:latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Prepare container
|
|
uses: pkgforge-dev/anylinux-setup-action@v2
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v7
|
|
with:
|
|
python-version: 3.11
|
|
cache: 'pip'
|
|
|
|
- name: Install python dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libpng-dev libjpeg-dev p7zip-full p7zip-rar python3-pip squashfs-tools libxcb-cursor0
|
|
python -m pip install --upgrade pip
|
|
python -m pip install -r requirements.txt
|
|
|
|
- name: Install kcc
|
|
run: |
|
|
python -m pip install --break-system-packages .
|
|
|
|
- name: Determine version
|
|
id: version
|
|
run: |
|
|
if [[ "${{ github.event_name }}" == "release" ]]; then
|
|
echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "version=dev-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Build AppImage
|
|
env:
|
|
ARCH: ${{ matrix.arch }}
|
|
ICON: ${{ github.workspace }}/icons/comic2ebook.png
|
|
DESKTOP: ${{ github.workspace }}/packaging/appimage/kcc.desktop
|
|
DEPLOY_PYTHON: 1
|
|
OUTPATH: ${{ github.workspace }}/dist
|
|
OUTNAME: kcc-${{ steps.version.outputs.version }}-${{ matrix.arch }}.AppImage
|
|
run: |
|
|
mkdir -p dist
|
|
quick-sharun "$(which cli-chess)"
|
|
quick-sharun --make-appimage
|
|
|
|
- name: Test AppImage
|
|
run: |
|
|
quick-sharun --simple-test ./dist/*.AppImage
|
|
env:
|
|
UPDATE_INFO: gh-releases-zsync|ciromattia|kcc|latest|*x86_64.AppImage.zsync
|
|
|
|
- name: upload artifact
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: kcc-${{ steps.version.outputs.version }}-${{ matrix.arch }}
|
|
path: |
|
|
dist/*.AppImage
|
|
dist/*.AppImage.zsync
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v3
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
prerelease: true
|
|
generate_release_notes: false
|
|
files: |
|
|
dist/*.AppImage
|
|
dist/*.AppImage.zsync
|