fix IndexError #215
Workflow file for this run
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
name: Packaging | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
make-outputs: | |
runs-on: ubuntu-latest | |
outputs: | |
VERSION: ${{ steps.get_version.outputs.VERSION }} | |
steps: | |
- name: Get version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT | |
release_windows_amd64: | |
runs-on: windows-latest | |
needs: [make-outputs] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
- name: Build with pyinstaller | |
shell: bash -el {0} | |
run: | | |
uv venv --python 3.13 | |
uv build --wheel | |
cd packaging | |
uv pip install -r requirements-desktop.txt | |
uv pip install ../dist/*.whl --no-deps | |
uv run pyinstaller libresvip.spec | |
cd dist | |
7z a LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.win-amd64.7z libresvip | |
rm -rf libresvip | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libresvip-win-amd64.zip | |
path: ./packaging/dist/ | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: v${{ needs.make-outputs.outputs.VERSION }} | |
files: | | |
./packaging/dist/LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.win-amd64.7z | |
release_windows_msys2_ucrt64: | |
runs-on: windows-latest | |
needs: [make-outputs] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
update: true | |
install: >- | |
mingw-w64-ucrt-x86_64-python-pip | |
mingw-w64-ucrt-x86_64-uv | |
p7zip | |
- name: Build with pyinstaller | |
shell: msys2 {0} | |
run: | | |
uv build --wheel | |
cd packaging | |
python mingw_install.py | |
python -m pip install ../dist/*.whl --no-deps | |
pyinstaller libresvip.spec | |
cd dist | |
7z a LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.msys2-ucrt64.7z libresvip | |
rm -rf libresvip | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libresvip-msys2-ucrt64.zip | |
path: ./packaging/dist/ | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: v${{ needs.make-outputs.outputs.VERSION }} | |
files: | | |
./packaging/dist/LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.msys2-ucrt64.7z | |
release_windows_webview: | |
runs-on: windows-latest | |
needs: [make-outputs] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
- name: Build with pyinstaller | |
shell: bash -el {0} | |
run: | | |
uv venv --python 3.13 | |
uv build --wheel | |
cd packaging | |
uv pip install -r requirements-webui.txt | |
uv pip install ../dist/*.whl --no-deps | |
uv run pyinstaller libresvip-web.spec | |
cd dist | |
7z a LibreSVIP-web-${{ needs.make-outputs.outputs.VERSION }}.win-amd64.7z libresvip-web | |
rm -rf libresvip-web | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libresvip-web-win-amd64.zip | |
path: ./packaging/dist/ | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: v${{ needs.make-outputs.outputs.VERSION }} | |
files: | | |
./packaging/dist/LibreSVIP-web-${{ needs.make-outputs.outputs.VERSION }}.win-amd64.7z | |
release_windows_arm64: | |
runs-on: ubuntu-latest | |
needs: [make-outputs] | |
env: | |
PYINSTALLER_VERSION: "6.11.1" | |
PYTHON_VERSION: "3.12" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
- name: Build with pyinstaller | |
run: | | |
uv build --wheel | |
uv venv --python $PYTHON_VERSION | |
cd packaging | |
export MINGW_PACKAGE_PREFIX=mingw-w64-clang-aarch64 | |
export MSYSTEM=CLANGARM64 | |
uv run python -m ensurepip | |
uv run python mingw_install.py | |
docker compose -f docker-compose-msys2-clangarm64.yml up | |
uv run python -m pip download pyinstaller==$PYINSTALLER_VERSION --platform win_arm64 --only-binary=:all: | |
uv run python -m pip install wheel | |
uv run python -m wheel unpack pyinstaller-$PYINSTALLER_VERSION-py3-none-win_arm64.whl | |
sudo mv ./pyinstaller-$PYINSTALLER_VERSION/PyInstaller/bootloader/Windows-64bit-arm ./clangarm64/lib/python$PYTHON_VERSION/site-packages/PyInstaller/bootloader | |
sudo cp ./clangarm64/bin/libmediainfo-0.dll ./clangarm64/lib/python$PYTHON_VERSION/site-packages/pymediainfo/ | |
docker compose -f docker-compose-build-wine-arm64.yml up | |
mkdir archive | |
cd dist | |
7z a ../archive/LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.win-arm64.7z libresvip | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libresvip-win-arm64.zip | |
path: ./packaging/archive/ | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: v${{ needs.make-outputs.outputs.VERSION }} | |
files: | | |
./packaging/archive/LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.win-arm64.7z | |
release_linux_x86_64: | |
runs-on: ubuntu-latest | |
needs: [make-outputs] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
- name: Install OS dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libegl1 | |
- name: Build with pyinstaller | |
run: | | |
uv build --wheel | |
uv venv --python 3.13 | |
cd packaging | |
uv pip install -r requirements-desktop.txt | |
uv pip install ../dist/*.whl --no-deps | |
uv run pyinstaller libresvip.spec | |
cd dist | |
tar -czvf LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.linux-x86_64.tar.gz libresvip | |
rm -rf libresvip | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libresvip-linux-x86_64.zip | |
path: ./packaging/dist/ | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: v${{ needs.make-outputs.outputs.VERSION }} | |
files: | | |
./packaging/dist/LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.linux-x86_64.tar.gz | |
release_linux_aarch64: | |
runs-on: ubuntu-24.04-arm | |
needs: [make-outputs] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
- name: Install OS dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y binutils curl libdouble-conversion3 libfreetype6 libfontconfig1 libegl1 libgl1 libglib2.0-0 libmediainfo-dev libtiff6 libwayland-dev libwebp7 libwebpdemux2 libwebpmux3 libxt6 | |
- name: Build with pyinstaller | |
run: | | |
uv build --wheel | |
uv venv --python 3.13 | |
cd packaging | |
uv pip install -r requirements-desktop.txt | |
uv pip install ../dist/*.whl --no-deps | |
uv run pyinstaller libresvip.spec | |
cd dist | |
tar -czvf LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.linux-aarch64.tar.gz libresvip | |
rm -rf libresvip | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libresvip-linux-aarch64.zip | |
path: ./packaging/dist/ | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: v${{ needs.make-outputs.outputs.VERSION }} | |
files: | | |
./packaging/dist/LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.linux-aarch64.tar.gz | |
release_macos_x86_64: | |
runs-on: macos-13 | |
needs: [make-outputs] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
- name: Build with pyinstaller | |
run: | | |
uv build --wheel | |
uv venv --python 3.13 | |
cd packaging | |
uv pip install -r requirements-desktop.txt | |
uv pip install ../dist/*.whl --no-deps | |
uv run python -m PyInstaller libresvip.spec | |
brew install create-dmg | |
create-dmg --volname "LibreSVIP" dist/LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.macos-x86_64.dmg ./dist/LibreSVIP.app | |
rm -rf ./dist/LibreSVIP.app | |
cd .. | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libresvip-macos-x86_64.zip | |
path: ./packaging/dist/ | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: v${{ needs.make-outputs.outputs.VERSION }} | |
files: | | |
./packaging/dist/LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.macos-x86_64.dmg | |
release_macos_arm64: | |
runs-on: macos-latest | |
needs: [make-outputs] | |
env: | |
LIBMEDIAINFO_VERSION: "24.12" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
- name: Build with pyinstaller | |
run: | | |
uv build --wheel | |
uv venv --python 3.13 | |
cd packaging | |
uv pip install -r requirements-desktop.txt | |
curl -L https://mediaarea.net/download/binary/libmediainfo0/${LIBMEDIAINFO_VERSION}/MediaInfo_DLL_${LIBMEDIAINFO_VERSION}_Mac_x86_64+arm64.tar.bz2 --output libmediainfo.tar.bz2 | |
tar xvf libmediainfo.tar.bz2 | |
mv MediaInfoLib/libmediainfo.0.dylib ../.venv/lib/python3.13/site-packages/pymediainfo/ | |
uv pip install ../dist/*.whl --no-deps | |
uv run python -m PyInstaller libresvip.spec | |
brew install create-dmg | |
create-dmg --volname "LibreSVIP" dist/LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.macos-arm64.dmg ./dist/LibreSVIP.app | |
rm -rf ./dist/LibreSVIP.app | |
cd .. | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libresvip-macos-arm64.zip | |
path: ./packaging/dist/ | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: v${{ needs.make-outputs.outputs.VERSION }} | |
files: | | |
./packaging/dist/LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.macos-arm64.dmg | |
release_apk: | |
runs-on: ubuntu-latest | |
needs: [make-outputs] | |
env: | |
FLUTTER_VERSION: "3.24.4" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
- name: Install Python Dependencies | |
run: | | |
uv build --wheel | |
uv venv --python 3.12 | |
uv sync --extra mobile | |
uv run python -m ensurepip --upgrade | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ env.FLUTTER_VERSION }} | |
- name: Setup Java JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Flet Build APK | |
run: | | |
flutter config --no-analytics | |
cd packaging | |
uv run python install_mobile_requirements.py --platform android_24_arm64_v8a --arch arm64-v8a | |
uv run python install_mobile_requirements.py --platform android_24_armeabi_v7a --arch armeabi-v7a | |
uv run python install_mobile_requirements.py --platform android_24_x86_64 --arch x86_64 | |
bash build_apk.sh | |
mv build/apk/app-release.apk build/apk/LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.apk | |
cd .. | |
- name: Upload APK Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libresvip-android.zip | |
path: ./packaging/build/apk | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: v${{ needs.make-outputs.outputs.VERSION }} | |
files: | | |
./packaging/build/apk/LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.apk |