From b550956a3eaa0bb790c1646d07ff40d8baef869b Mon Sep 17 00:00:00 2001 From: Benexl Date: Wed, 31 Dec 2025 21:03:29 +0300 Subject: [PATCH] fix: update Ubuntu version in release binaries workflow to 22.04 --- .github/workflows/release-binaries.yml | 262 ++++++++++++------------- 1 file changed, 131 insertions(+), 131 deletions(-) diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index b7a180f..4572f19 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -1,152 +1,152 @@ name: Build Release Binaries on: - release: - types: [published] - workflow_dispatch: - inputs: - tag: - description: "Tag/version to build (leave empty for latest)" - required: false - type: string + release: + types: [published] + workflow_dispatch: + inputs: + tag: + description: "Tag/version to build (leave empty for latest)" + required: false + type: string permissions: - contents: write + contents: write jobs: - build: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - target: linux - asset_name: viu-linux-x86_64 - executable: viu - - os: windows-latest - target: windows - asset_name: viu-windows-x86_64.exe - executable: viu.exe - - os: macos-latest - target: macos - asset_name: viu-macos-x86_64 - executable: viu + build: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-22.04 + target: linux + asset_name: viu-linux-x86_64 + executable: viu + - os: windows-latest + target: windows + asset_name: viu-windows-x86_64.exe + executable: viu.exe + - os: macos-latest + target: macos + asset_name: viu-macos-x86_64 + executable: viu - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.tag || github.ref }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.tag || github.ref }} - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.11" + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" - - name: Install uv - uses: astral-sh/setup-uv@v3 - with: - enable-cache: true + - name: Install uv + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true - - name: Install system dependencies (Linux) - if: runner.os == 'Linux' - run: | - sudo apt-get update - sudo apt-get install -y libdbus-1-dev libglib2.0-dev + - name: Install system dependencies (Linux) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y libdbus-1-dev libglib2.0-dev - - name: Install dependencies - run: uv sync --all-extras --all-groups + - name: Install dependencies + run: uv sync --all-extras --all-groups - - name: Build executable with PyInstaller - run: uv run pyinstaller bundle/pyinstaller.spec --distpath dist --workpath build/pyinstaller --clean + - name: Build executable with PyInstaller + run: uv run pyinstaller bundle/pyinstaller.spec --distpath dist --workpath build/pyinstaller --clean - - name: Rename executable - shell: bash - run: mv dist/${{ matrix.executable }} dist/${{ matrix.asset_name }} + - name: Rename executable + shell: bash + run: mv dist/${{ matrix.executable }} dist/${{ matrix.asset_name }} - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.asset_name }} - path: dist/${{ matrix.asset_name }} - if-no-files-found: error + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.asset_name }} + path: dist/${{ matrix.asset_name }} + if-no-files-found: error - - name: Upload to Release - if: github.event_name == 'release' - uses: softprops/action-gh-release@v2 - with: - files: dist/${{ matrix.asset_name }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # Build for macOS ARM (Apple Silicon) - build-macos-arm: - runs-on: macos-14 - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.tag || github.ref }} - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: Install uv - uses: astral-sh/setup-uv@v3 - with: - enable-cache: true - - - name: Install dependencies - run: uv sync --all-extras --all-groups - - - name: Build executable with PyInstaller - run: uv run pyinstaller bundle/pyinstaller.spec --distpath dist --workpath build/pyinstaller --clean - - - name: Rename executable - run: mv dist/viu dist/viu-macos-arm64 - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: viu-macos-arm64 - path: dist/viu-macos-arm64 - if-no-files-found: error - - - name: Upload to Release - if: github.event_name == 'release' - uses: softprops/action-gh-release@v2 - with: - files: dist/viu-macos-arm64 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # Create checksums after all builds complete - checksums: - needs: [build, build-macos-arm] - runs-on: ubuntu-latest + - name: Upload to Release if: github.event_name == 'release' + uses: softprops/action-gh-release@v2 + with: + files: dist/${{ matrix.asset_name }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: Download all artifacts - uses: actions/download-artifact@v4 - with: - path: artifacts - merge-multiple: true + # Build for macOS ARM (Apple Silicon) + build-macos-arm: + runs-on: macos-14 - - name: Generate checksums - run: | - cd artifacts - sha256sum * > SHA256SUMS.txt - cat SHA256SUMS.txt + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.tag || github.ref }} - - name: Upload checksums to Release - uses: softprops/action-gh-release@v2 - with: - files: artifacts/SHA256SUMS.txt - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install uv + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true + + - name: Install dependencies + run: uv sync --all-extras --all-groups + + - name: Build executable with PyInstaller + run: uv run pyinstaller bundle/pyinstaller.spec --distpath dist --workpath build/pyinstaller --clean + + - name: Rename executable + run: mv dist/viu dist/viu-macos-arm64 + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: viu-macos-arm64 + path: dist/viu-macos-arm64 + if-no-files-found: error + + - name: Upload to Release + if: github.event_name == 'release' + uses: softprops/action-gh-release@v2 + with: + files: dist/viu-macos-arm64 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Create checksums after all builds complete + checksums: + needs: [build, build-macos-arm] + runs-on: ubuntu-latest + if: github.event_name == 'release' + + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + merge-multiple: true + + - name: Generate checksums + run: | + cd artifacts + sha256sum * > SHA256SUMS.txt + cat SHA256SUMS.txt + + - name: Upload checksums to Release + uses: softprops/action-gh-release@v2 + with: + files: artifacts/SHA256SUMS.txt + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}