diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 06ec0ae..8b33c3e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -129,17 +129,28 @@ jobs: appimage: needs: [parse_tag, validate] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - name: Set up APPDIR for after_bundle - run: echo "APPDIR=$PWD/AppDir" >> $GITHUB_ENV - - name: Build AppImage - uses: AppImageCrafters/build-appimage@v1.3 + - uses: actions/setup-python@v4 with: - recipe: './release-utils/appimage/appimage-builder.yml' + python-version: '3.10' + - name: Install poetry + run: | + python -m pip install --upgrade pip + pip install --upgrade poetry + - run: sudo apt-get install -y fuse + - name: Install appimage-builder + run: | + wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage + chmod +x appimage-builder-x86_64.AppImage + sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder + - name: Build AppImage env: APP_VERSION: ${{ needs.parse_tag.outputs.version }} + run: poetry run appimage-builder --skip-tests --recipe ./release-utils/appimage/appimage-builder.yml + - name: Validate built AppImage + run: ./rclip*.AppImage cat - name: Rename AppImage for GitHub releases page run: mv rclip-${{ needs.parse_tag.outputs.version }}-x86_64.AppImage rclip-${{ needs.parse_tag.outputs.version }}-amd64.AppImage - uses: actions/upload-artifact@v3 diff --git a/.gitignore b/.gitignore index d93036f..eddead7 100644 --- a/.gitignore +++ b/.gitignore @@ -141,6 +141,7 @@ cython_debug/ # AppImage AppDir appimage-builder-cache +appimage-build *.AppImage *.AppImage.zsync requirements.txt diff --git a/pyproject.toml b/pyproject.toml index 2828316..08ac339 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "rclip" -version = "1.11.1a12" +version = "1.11.1a24" description = "AI-Powered Command-Line Photo Search Tool" authors = ["Yurij Mikhalevich "] license = "MIT" diff --git a/release-utils/appimage/appimage-builder.yml b/release-utils/appimage/appimage-builder.yml index 9dcc8ca..6bfa057 100644 --- a/release-utils/appimage/appimage-builder.yml +++ b/release-utils/appimage/appimage-builder.yml @@ -10,7 +10,6 @@ script: - cp rclip AppDir/usr/src -r - cp release-utils/appimage/logo@256.png AppDir/usr/share/icons/hicolor/256x256/apps/rclip.png - AppDir: path: ./AppDir @@ -22,30 +21,32 @@ AppDir: # Set the python executable as entry point exec: usr/bin/python3.10 # Set the application main script path as argument. Use '$@' to forward CLI parameters - exec_args: "${APPDIR}/usr/bin/rclip $@" + exec_args: "${APPDIR}/usr/local/bin/rclip $@" apt: arch: amd64 sources: - - sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse' - key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32' - - sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-updates main restricted' - key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32' - - sourceline: 'deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal main' + - sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse' + key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C' + - sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted' + key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C' + - sourceline: 'deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu jammy main' key_url: 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xba6932366a755776' include: - - curl - libffi7 - libpython3.10-minimal - libpython3.10-stdlib - python3.10 - - python3.10-distutils - python3.10-minimal + - python3-pip + - python3-distutils exclude: [] - after_bundle: > - PATH=${APPDIR}/usr/bin:${PATH} ./release-utils/appimage/appimage_after_bundle.sh + after_bundle: | + export APPDIR="$(pwd)/AppDir" + echo ${APPDIR} + PATH="${APPDIR}/usr/bin:${PATH}" ./release-utils/appimage/appimage_after_bundle.sh runtime: env: diff --git a/release-utils/appimage/appimage_after_bundle.sh b/release-utils/appimage/appimage_after_bundle.sh index 8c6923e..373fe07 100755 --- a/release-utils/appimage/appimage_after_bundle.sh +++ b/release-utils/appimage/appimage_after_bundle.sh @@ -3,9 +3,9 @@ set -e PYTHONHOME=$APPDIR/usr \ -PYTHONPATH=$APPDIR/usr/lib/python3.10/site-packages:$APPDIR/usr/lib/python3.10 \ +PYTHONPATH=$APPDIR/usr/lib/python3/dist-packages:$APPDIR/usr/lib/python3.10 \ LD_LIBRARY_PATH=$APPDIR/usr/lib/x86_64-linux-gnu \ -curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 && +which python3.10 && python3.10 -m pip install poetry==1.8.4 && python3.10 -m pip install --upgrade --isolated --no-input --ignore-installed --prefix="$APPDIR/usr" certifi setuptools wheel && python3.10 -m poetry build && diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 1fe917c..b90d766 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -10,7 +10,7 @@ description: | For a detailed demonstration, watch the video: https://www.youtube.com/watch?v=tAJHXOkHidw. You can use another image as a query by passing a file path or even an URL to the image file to **rclip** and combine multiple queries. Check out the project's README on GitHub for more usage examples: https://github.com/yurijmikhalevich/rclip#readme. -version: 1.11.1a12 +version: 1.11.1a24 website: https://github.com/yurijmikhalevich/rclip contact: yurij@mikhalevi.ch passthrough: @@ -28,7 +28,7 @@ apps: parts: rclip: plugin: python - source: ./snap/local/rclip-1.11.1a12.tar.gz + source: ./snap/local/rclip-1.11.1a24.tar.gz build-packages: - python3-pip build-environment: