mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-07-03 12:34:00 +03:00
Enhance release workflow by adding aria2c package for Windows and Linux, updating dependency installation, and zipping release packages
This commit is contained in:
@@ -11,15 +11,18 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: https://gitea.com/actions/checkout@v5
|
||||
|
||||
- name: Set up Python
|
||||
uses: https://gitea.com/actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install --upgrade pip
|
||||
sudo apt update
|
||||
sudo apt install -y unzip zip curl
|
||||
|
||||
- name: Prepare Windows package
|
||||
run: |
|
||||
set -e
|
||||
@@ -27,17 +30,26 @@ jobs:
|
||||
cp yt-playlist-main.py dist/windows/
|
||||
cp yt-playlist-config.json dist/windows/
|
||||
|
||||
# yt-dlp
|
||||
curl -L -o dist/windows/yt-dlp.exe https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe
|
||||
|
||||
# FFmpeg Windows static
|
||||
curl -L -o dist/windows/ffmpeg.zip https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip
|
||||
unzip -q dist/windows/ffmpeg.zip -d dist/windows/ffmpeg_temp
|
||||
mv $(find dist/windows/ffmpeg_temp -name ffmpeg.exe | head -n 1) dist/windows/ffmpeg.exe
|
||||
|
||||
# aria2c Windows static
|
||||
curl -L -o dist/windows/aria2c.zip https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip
|
||||
unzip dist/windows/aria2c.zip -d dist/windows/
|
||||
mv dist/windows/aria2-1.37.0-win-64bit-build1/aria2c.exe dist/windows/aria2c.exe
|
||||
|
||||
# Zip everything at top level
|
||||
cd dist/windows
|
||||
zip -r ../../yt-playlist-windows-${CI_COMMIT_TAG}.zip *
|
||||
cd ../..
|
||||
|
||||
- name: Clean up Windows temp files
|
||||
run: rm -rf dist/windows/ffmpeg_temp dist/windows/aria2-1.37.0-win-64bit-build1
|
||||
|
||||
- name: Upload Windows release
|
||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||
@@ -49,16 +61,21 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: https://gitea.com/actions/checkout@v5
|
||||
|
||||
- name: Set up Python
|
||||
uses: https://gitea.com/actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install --upgrade pip
|
||||
sudo apt update
|
||||
sudo apt install -y unzip zip build-essential pkg-config libssl-dev \
|
||||
libxml2-dev zlib1g-dev libsqlite3-dev autoconf automake libtool wget gettext curl
|
||||
sudo apt install -y \
|
||||
unzip zip curl wget build-essential pkg-config \
|
||||
autoconf automake libtool gettext \
|
||||
libssl-dev libxml2-dev zlib1g-dev libsqlite3-dev
|
||||
|
||||
- name: Prepare Linux package
|
||||
run: |
|
||||
set -e
|
||||
@@ -70,14 +87,14 @@ jobs:
|
||||
curl -L -o dist/linux/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux
|
||||
chmod +x dist/linux/yt-dlp
|
||||
|
||||
# FFmpeg
|
||||
# FFmpeg Linux static
|
||||
curl -L -o dist/linux/ffmpeg.tar.xz https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
|
||||
mkdir -p dist/linux/ffmpeg_temp
|
||||
tar -xf dist/linux/ffmpeg.tar.xz -C dist/linux/ffmpeg_temp --strip-components=1
|
||||
mv dist/linux/ffmpeg_temp/ffmpeg dist/linux/ffmpeg
|
||||
chmod +x dist/linux/ffmpeg
|
||||
|
||||
# aria2c build
|
||||
# Build aria2c Linux static
|
||||
mkdir -p dist/linux/aria2c_build
|
||||
cd dist/linux/aria2c_build
|
||||
wget https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0.tar.gz
|
||||
@@ -90,8 +107,13 @@ jobs:
|
||||
cd ../../
|
||||
chmod +x dist/linux/aria2c
|
||||
|
||||
# Zip everything at top level
|
||||
cd dist/linux
|
||||
zip -r ../../yt-playlist-linux-${CI_COMMIT_TAG}.zip *
|
||||
cd ../..
|
||||
|
||||
- name: Clean up Linux temp files
|
||||
run: rm -rf dist/linux/ffmpeg_temp dist/linux/aria2c_build
|
||||
|
||||
- name: Upload Linux release
|
||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||
|
||||
Reference in New Issue
Block a user