build-prerelease #1005
This file contains hidden or 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: build-prerelease | |
| on: | |
| workflow_dispatch: | |
| env: | |
| APP_VERSION: 2.3.9 | |
| jobs: | |
| build-Linux: | |
| runs-on: ubuntu-latest | |
| permissions: write-all | |
| steps: | |
| - uses: actions/checkout@v3 | |
| # - name: Set up Python | |
| # uses: actions/setup-python@v5 | |
| # with: | |
| # python-version: 3.10.15" | |
| - name: Setup Distrobox | |
| run : | | |
| sudo apt install distrobox | |
| distrobox create -i ubuntu:20.04 --yes | |
| - name: Install Python in distrobox | |
| run : | | |
| distrobox enter ubuntu-20-04 -- sudo apt-get install python3 python3-pip wget -y && pip install patchelf && wget https://github.com/astral-sh/python-build-standalone/releases/download/20250317/cpython-3.10.16+20250317-x86_64-unknown-linux-gnu-install_only.tar.gz && tar xf cpython-3.10.16+20250317-x86_64-unknown-linux-gnu-install_only.tar.gz | |
| - name: Install Python Dependencies | |
| run: | | |
| distrobox enter ubuntu-20-04 -- ./python/bin/python3 -m pip install -r requirements.txt | |
| - name: install other requirements | |
| run : | | |
| distrobox enter ubuntu-20-04 -- sudo apt update && sudo apt-get install libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libgtk-3-0 libpulse0 libwayland-cursor0 libwayland-egl1 libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-shape0 -y | |
| distrobox enter ubuntu-20-04 -- ./python/bin/python3 -m pip install patchelf | |
| - name: Build | |
| run: distrobox enter ubuntu-20-04 -- ./python/bin/python3 build.py --build cx_freeze --copy_backend | |
| - name: compress archive | |
| run: | | |
| mv dist/ bin/ | |
| zip -r REAL-Video-Enhancer-${{ env.APP_VERSION }}-Linux-portable_x86_64.zip bin/ | |
| - name: compress backend | |
| run: | # remove .github to save space | |
| git submodule update --init --recursive | |
| rm -rf backend/src/pytorch/spandrel/.github | |
| tar czf backend-v${{ env.APP_VERSION }}.tar.gz backend/ | |
| - name: Save Archive as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: REAL-Video-Enhancer-${{ env.APP_VERSION }}-Linux-portable_x86_64.zip | |
| path: REAL-Video-Enhancer-${{ env.APP_VERSION }}-Linux-portable_x86_64.zip | |
| - name: Save Archive as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: backend-v${{ env.APP_VERSION }}.tar.gz | |
| path: backend-v${{ env.APP_VERSION }}.tar.gz | |
| build-Linux_arm64: | |
| runs-on: ubuntu-22.04-arm | |
| permissions: write-all | |
| steps: | |
| - uses: actions/checkout@v3 | |
| # - name: Set up Python | |
| # uses: actions/setup-python@v5 | |
| # with: | |
| # python-version: 3.10.15" | |
| - name: Install Python in distrobox | |
| run : | | |
| sudo apt-get install python3 python3-pip wget -y && pip install patchelf && wget https://github.com/astral-sh/python-build-standalone/releases/download/20250317/cpython-3.10.16+20250317-aarch64-unknown-linux-gnu-install_only.tar.gz && tar xf cpython-3.10.16+20250317-aarch64-unknown-linux-gnu-install_only.tar.gz | |
| - name: Install Python Dependencies | |
| run: | | |
| ./python/bin/python3 -m pip install -r requirements.txt | |
| - name: install other requirements | |
| run : | | |
| sudo apt update && sudo apt-get install libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libgtk-3-0 libpulse0 libwayland-cursor0 libwayland-egl1 libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-shape0 -y | |
| ./python/bin/python3 -m pip install patchelf | |
| - name: Build | |
| run: ./python/bin/python3 build.py --build cx_freeze --copy_backend | |
| - name: compress archive | |
| run: | | |
| mv dist/ bin/ | |
| zip -r REAL-Video-Enhancer-${{ env.APP_VERSION }}-Linux-portable_arm64.zip bin/ | |
| - name: compress backend | |
| run: | | |
| tar czf backend-v${{ env.APP_VERSION }}.tar.gz backend/ | |
| - name: Save Archive as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: REAL-Video-Enhancer-${{ env.APP_VERSION }}-Linux-portable_arm64.zip | |
| path: REAL-Video-Enhancer-${{ env.APP_VERSION }}-Linux-portable_arm64.zip | |
| build-Windows: | |
| runs-on: windows-2022 | |
| permissions: write-all | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12.9 | |
| - name: Install Python Dependencies | |
| run: | | |
| python3 -m pip install -r requirements.txt | |
| - name: Build | |
| run: python3 build.py --build pyinstaller --copy_backend | |
| - name: compress archive | |
| run: | | |
| cd dist | |
| tar -a -c -f REAL-Video-Enhancer-${{ env.APP_VERSION }}-Windows.zip REAL-Video-Enhancer | |
| cd .. | |
| cp dist/REAL-Video-Enhancer-${{ env.APP_VERSION }}-Windows.zip REAL-Video-Enhancer-${{ env.APP_VERSION }}-Windows-portable_x86_64.zip | |
| - name: create windows installer | |
| run: | | |
| choco install nsis | |
| makensis /DARCH=x64 REAL-Video-Enhancer.nsi | |
| mv REAL-Video-Enhancer-${{ env.APP_VERSION }}-Windows-Setup.exe REAL-Video-Enhancer-${{ env.APP_VERSION }}-Windows-Setup_x86_64.exe | |
| - name: Save Archive as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: REAL-Video-Enhancer-${{ env.APP_VERSION }}-Windows-portable_x86_64.zip | |
| path: REAL-Video-Enhancer-${{ env.APP_VERSION }}-Windows-portable_x86_64.zip | |
| - name: Save Archive as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: REAL-Video-Enhancer-${{ env.APP_VERSION }}-Windows-Setup_x86_64.exe | |
| path: REAL-Video-Enhancer-${{ env.APP_VERSION }}-Windows-Setup_x86_64.exe | |
| build-MacOS: | |
| runs-on: macos-13 | |
| permissions: write-all | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.11.9 | |
| - name: Install Python Dependencies | |
| run: | | |
| brew install llvm@15 | |
| brew install pyside | |
| python3 -m pip install -r requirements.txt | |
| - name: Build | |
| run: python3 build.py --build pyinstaller --copy_backend | |
| - name: compress archive | |
| run: | | |
| zip -r REAL-Video-Enhancer-${{ env.APP_VERSION }}-MacOS_x86_64.zip dist/REAL-Video-Enhancer/ | |
| - name: Save Archive as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: REAL-Video-Enhancer-${{ env.APP_VERSION }}-MacOS_x86_64.zip | |
| path: REAL-Video-Enhancer-${{ env.APP_VERSION }}-MacOS_x86_64.zip | |
| build-MacOS_arm64: | |
| runs-on: macos-14 | |
| permissions: write-all | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.11.9 | |
| - name: Install Python Dependencies | |
| run: | | |
| brew install pyside@6 | |
| python3 -m pip install -r requirements.txt | |
| - name: Build | |
| run: | | |
| python3 build.py --build pyinstaller --copy_backend | |
| - name: compress archive | |
| run: | | |
| zip -r REAL-Video-Enhancer-${{ env.APP_VERSION }}-MacOS_arm64.zip dist/REAL-Video-Enhancer/ | |
| - name: Save Archive as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: REAL-Video-Enhancer-${{ env.APP_VERSION }}-MacOS_arm64.zip | |
| path: REAL-Video-Enhancer-${{ env.APP_VERSION }}-MacOS_arm64.zip | |
| Release: | |
| needs: [build-Windows, build-Linux, build-MacOS, build-MacOS_arm64, build-Linux_arm64] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Generate version and tag | |
| id: version_tag | |
| run: | | |
| git clone https://github.com/tntwise/real-video-enhancer --branch ${{ env.APP_VERSION }} | |
| cp real-video-enhancer/CHANGELOG.md . | |
| version=$(python -c "from datetime import datetime; print(str(datetime.now()).split(' ')[0].replace('-',''))") | |
| tag=$(python -c "import random, string; print(''.join(random.choices(string.ascii_letters, k=8)))") | |
| python3 real-video-enhancer/scripts/printchangelog.py > RELEASE_BODY.md | |
| cat real-video-enhancer/EXTRA_NOTES.md >> RELEASE_BODY.md | |
| echo "Version=$version" | |
| echo "Tag=$version" | |
| echo "Body=$body" | |
| echo "::set-output name=version::$version" | |
| echo "::set-output name=tag::$version" | |
| #- name: Compute SHA256 checksums | |
| # run: | | |
| # for file in artifacts/*; do | |
| # for file1 in $file/*; do | |
| # sha256sum "$file1" >> RELEASE_BODY.md | |
| # done | |
| # done | |
| - name: Download flatpakref | |
| run: | | |
| wget https://dl.flathub.org/repo/appstream/io.github.tntwise.REAL-Video-Enhancer.flatpakref | |
| - name: Create Release and Upload Release Asset | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| name: REAL Video Enhancer ${{ env.APP_VERSION }} Pre-Release | |
| tag_name: RVE-${{ env.APP_VERSION }} | |
| body_path: ./RELEASE_BODY.md | |
| draft: false | |
| prerelease: true | |
| files: | | |
| artifacts/REAL-Video-Enhancer-${{ env.APP_VERSION }}-Windows-portable_x86_64.zip/REAL-Video-Enhancer-${{ env.APP_VERSION }}-Windows-portable_x86_64.zip | |
| artifacts/REAL-Video-Enhancer-${{ env.APP_VERSION }}-Windows-Setup_x86_64.exe/REAL-Video-Enhancer-${{ env.APP_VERSION }}-Windows-Setup_x86_64.exe | |
| artifacts/REAL-Video-Enhancer-${{ env.APP_VERSION }}-Linux-portable_x86_64.zip/REAL-Video-Enhancer-${{ env.APP_VERSION }}-Linux-portable_x86_64.zip | |
| artifacts/REAL-Video-Enhancer-${{ env.APP_VERSION }}-Linux-portable_arm64.zip/REAL-Video-Enhancer-${{ env.APP_VERSION }}-Linux-portable_arm64.zip | |
| artifacts/REAL-Video-Enhancer-${{ env.APP_VERSION }}-MacOS_x86_64.zip/REAL-Video-Enhancer-${{ env.APP_VERSION }}-MacOS_x86_64.zip | |
| artifacts/REAL-Video-Enhancer-${{ env.APP_VERSION }}-MacOS_arm64.zip/REAL-Video-Enhancer-${{ env.APP_VERSION }}-MacOS_arm64.zip | |
| io.github.tntwise.REAL-Video-Enhancer.flatpakref | |
| artifacts/backend-v${{ env.APP_VERSION }}.tar.gz/backend-v${{ env.APP_VERSION }}.tar.gz |