Improve Linux compatibility (#6)

* Improve Linux compatibility

* Run CI on Linux builds

* Update release workflow for Linux builds
This commit is contained in:
Nexmoe
2025-10-30 21:36:00 +08:00
committed by GitHub
parent 10a97b1f4a
commit 37c1f22aee
4 changed files with 76 additions and 39 deletions

View File

@@ -6,7 +6,19 @@ on:
jobs:
test:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
build-script: pnpm run build:win
ytdlp-asset: yt-dlp.exe
ytdlp-output: yt-dlp.exe
- os: ubuntu-latest
build-script: pnpm run build:linux
ytdlp-asset: yt-dlp
ytdlp-output: yt-dlp_linux
runs-on: ${{ matrix.os }}
steps:
- name: Check out Git repository
@@ -25,13 +37,16 @@ jobs:
- name: Install Dependencies
run: pnpm install
- name: Download yt-dlp binaries
- name: Download yt-dlp binary
shell: bash
run: |
# Download yt-dlp.exe for Windows
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe -o resources/yt-dlp.exe
curl -L "https://github.com/yt-dlp/yt-dlp/releases/latest/download/${{ matrix.ytdlp-asset }}" -o "resources/${{ matrix.ytdlp-output }}"
if [[ "${{ runner.os }}" == "Linux" ]]; then
chmod +x "resources/${{ matrix.ytdlp-output }}"
fi
- name: Lint and format check
run: pnpm run check
- name: build-win
run: pnpm run build:win
- name: Build application
run: ${{ matrix.build-script }}