update entrypoint #126
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: | |
runs-on: windows-latest | |
needs: [make-outputs] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: 3.12 | |
- name: Build with pyinstaller | |
shell: bash -el {0} | |
run: | | |
pdm sync -G desktop -G ujson -G ruamel_yaml -G lxml -G packaging --no-editable | |
cd packaging | |
pdm 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.7z | |
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 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: 3.11 | |
- name: Export requirements | |
shell: bash -el {0} | |
run: | | |
pdm export -G desktop -G ujson -G ruamel_yaml -G lxml -G packaging -o packaging/requirements.txt --without-hashes | |
pdm build --no-sdist | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
update: true | |
install: mingw-w64-ucrt-x86_64-python-pip | |
- name: Build with pyinstaller | |
shell: msys2 {0} | |
run: | | |
python -m pip install dist/*.whl --no-deps | |
cd packaging | |
python mingw_install.py | |
pyinstaller libresvip.spec | |
cd dist | |
pacman -S p7zip --noconfirm | |
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.7z | |
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 Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: 3.12 | |
- name: Build with pyinstaller | |
shell: bash -el {0} | |
run: | | |
pdm sync -G webui -G ujson -G ruamel_yaml -G lxml -G packaging --no-editable | |
cd packaging | |
pdm 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.7z | |
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_linux: | |
runs-on: ubuntu-latest | |
needs: [make-outputs] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: 3.11 | |
- name: Install OS dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libegl1 | |
- name: Build with pyinstaller | |
run: | | |
pdm sync -G desktop -G ujson -G ruamel_yaml -G lxml -G packaging --no-editable | |
cd packaging | |
pdm 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.tar.gz | |
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-latest | |
needs: [make-outputs] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: uraimo/run-on-arch-action@v2 | |
name: Build artifact | |
with: | |
arch: aarch64 | |
distro: ubuntu20.04 | |
dockerRunArgs: --volume "${PWD}:/libresvip" | |
install: | | |
apt-get update | |
apt-get install -y software-properties-common | |
add-apt-repository ppa:deadsnakes/ppa | |
apt-get update | |
apt-get install -y binutils libdouble-conversion3 libfreetype6 libfontconfig1 libegl1 libgl1 libmediainfo-dev libtiff5 libwayland-dev libwebp6 libwebpdemux2 libwebpmux3 libxt6 python3.11-dev python3.11-venv | |
update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 | |
run: | | |
cd /libresvip | |
python -m ensurepip --upgrade | |
python -m pip install -U pdm | |
python -m pdm sync -G desktop -G ujson -G ruamel_yaml -G lxml -G packaging --no-editable | |
cd packaging | |
python -m pdm run pyinstaller libresvip.spec | |
cd dist | |
tar -czvf LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.linux-aarch64.tar.gz libresvip | |
rm -rf libresvip | |
cd ../.. | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libresvip-linux-aarch64.tar.gz | |
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: | |
runs-on: macos-14 | |
needs: [make-outputs] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python (MacOS Universal2) | |
if: matrix.os == 'macos-14' | |
run: | | |
curl -L https://www.python.org/ftp/python/3.12.3/python-3.12.3-macos11.pkg --output ~/Downloads/python.pkg | |
sudo installer -pkg ~/Downloads/python.pkg -target / | |
- uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: 3.12 | |
- name: Build with cx_freeze | |
run: | | |
pdm export -G desktop -G ujson -G ruamel_yaml -G lxml -G packaging -o packaging/requirements.txt --without-hashes | |
python -m venv .venv | |
source .venv/bin/activate | |
cd packaging | |
python -m ensurepip --upgrade | |
python -m pip install delocate | |
python universal2_install.py | |
cd .. | |
pdm build --no-sdist | |
python -m pip install dist/*.whl --no-deps | |
cd packaging | |
python setup.py bdist_dmg | |
mkdir dist | |
mv build/LibreSVIP.dmg dist/LibreSVIP-${{ needs.make-outputs.outputs.VERSION }}.macos-universal2.dmg | |
cd .. | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libresvip-macos-universal2.dmg | |
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-universal2.dmg |