mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-04-28 03:43:10 -07:00
fix: update Ubuntu version in release binaries workflow to 22.04
This commit is contained in:
262
.github/workflows/release-binaries.yml
vendored
262
.github/workflows/release-binaries.yml
vendored
@@ -1,152 +1,152 @@
|
|||||||
name: Build Release Binaries
|
name: Build Release Binaries
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
tag:
|
tag:
|
||||||
description: "Tag/version to build (leave empty for latest)"
|
description: "Tag/version to build (leave empty for latest)"
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-22.04
|
||||||
target: linux
|
target: linux
|
||||||
asset_name: viu-linux-x86_64
|
asset_name: viu-linux-x86_64
|
||||||
executable: viu
|
executable: viu
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
target: windows
|
target: windows
|
||||||
asset_name: viu-windows-x86_64.exe
|
asset_name: viu-windows-x86_64.exe
|
||||||
executable: viu.exe
|
executable: viu.exe
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
target: macos
|
target: macos
|
||||||
asset_name: viu-macos-x86_64
|
asset_name: viu-macos-x86_64
|
||||||
executable: viu
|
executable: viu
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.inputs.tag || github.ref }}
|
ref: ${{ github.event.inputs.tag || github.ref }}
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
|
|
||||||
- name: Install uv
|
- name: Install uv
|
||||||
uses: astral-sh/setup-uv@v3
|
uses: astral-sh/setup-uv@v3
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
|
|
||||||
- name: Install system dependencies (Linux)
|
- name: Install system dependencies (Linux)
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libdbus-1-dev libglib2.0-dev
|
sudo apt-get install -y libdbus-1-dev libglib2.0-dev
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync --all-extras --all-groups
|
run: uv sync --all-extras --all-groups
|
||||||
|
|
||||||
- name: Build executable with PyInstaller
|
- name: Build executable with PyInstaller
|
||||||
run: uv run pyinstaller bundle/pyinstaller.spec --distpath dist --workpath build/pyinstaller --clean
|
run: uv run pyinstaller bundle/pyinstaller.spec --distpath dist --workpath build/pyinstaller --clean
|
||||||
|
|
||||||
- name: Rename executable
|
- name: Rename executable
|
||||||
shell: bash
|
shell: bash
|
||||||
run: mv dist/${{ matrix.executable }} dist/${{ matrix.asset_name }}
|
run: mv dist/${{ matrix.executable }} dist/${{ matrix.asset_name }}
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.asset_name }}
|
name: ${{ matrix.asset_name }}
|
||||||
path: dist/${{ matrix.asset_name }}
|
path: dist/${{ matrix.asset_name }}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload to Release
|
- 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
|
|
||||||
if: github.event_name == '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:
|
# Build for macOS ARM (Apple Silicon)
|
||||||
- name: Download all artifacts
|
build-macos-arm:
|
||||||
uses: actions/download-artifact@v4
|
runs-on: macos-14
|
||||||
with:
|
|
||||||
path: artifacts
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Generate checksums
|
steps:
|
||||||
run: |
|
- name: Checkout repository
|
||||||
cd artifacts
|
uses: actions/checkout@v4
|
||||||
sha256sum * > SHA256SUMS.txt
|
with:
|
||||||
cat SHA256SUMS.txt
|
ref: ${{ github.event.inputs.tag || github.ref }}
|
||||||
|
|
||||||
- name: Upload checksums to Release
|
- name: Set up Python
|
||||||
uses: softprops/action-gh-release@v2
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
files: artifacts/SHA256SUMS.txt
|
python-version: "3.11"
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
- 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 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user