From 2c4b736e068c78fc5abca5a107f01581c72e8970 Mon Sep 17 00:00:00 2001 From: dark_zoul Date: Fri, 17 Oct 2025 15:57:10 +0300 Subject: [PATCH 01/38] Update README.md fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9eef05a..214f626 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Edit `yt-playlist-config.json` to specify playlists, paths, and options: { "url": "https://www.youtube.com/playlist?list=playlistidhere", "download_mode": "audio", - "max_video_quality": "1080p" + "max_video_quality": "1080p", "save_path": "./music", "archive": "archive.txt", } From c93da9e644e9640fecc18398b32f3b27fff94387 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 13:54:12 +0200 Subject: [PATCH 02/38] rename .gitea to .github --- {.gitea => .github}/workflows/release.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {.gitea => .github}/workflows/release.yml (100%) diff --git a/.gitea/workflows/release.yml b/.github/workflows/release.yml similarity index 100% rename from .gitea/workflows/release.yml rename to .github/workflows/release.yml From b2c64072c86f210b1a5870a66e13e095b1572a06 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 13:55:25 +0200 Subject: [PATCH 03/38] Add workflow_dispatch trigger to release workflow --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a6366fd..1a00577 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,7 @@ on: #- test tags: - "v*.*.*" + workflow_dispatch: jobs: build-windows-package: From c04a216a58d2c379ce5a25950ea4b887ae1be88e Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 14:07:50 +0200 Subject: [PATCH 04/38] Refactor CI/CD workflow to use GitHub Actions and update README for clarity --- .github/workflows/release.yml | 88 +++++++++++++++++++++++------------ README.md | 14 +++--- 2 files changed, 66 insertions(+), 36 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1a00577..fd9f901 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,9 @@ name: Build Release Packages on: - push: - #branches: - #- test - tags: - - "v*.*.*" + #push: + #tags: + #- "v*.*.*" workflow_dispatch: jobs: @@ -13,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: https://gitea.com/actions/checkout@v5 + uses: actions/checkout@v5 - name: Install dependencies run: | @@ -22,14 +20,14 @@ jobs: - name: Extract tag name run: | - REF="${GITEA_REF:-$GITHUB_REF}" + REF="${GITHUB_REF}" TAG="${REF#refs/tags/}" echo "TAG=$TAG" >> $GITHUB_ENV - name: Prepare Windows package run: | set -e - WORKSPACE_ROOT="${GITEA_WORKSPACE:-$PWD}" + WORKSPACE_ROOT="${GITHUB_WORKSPACE:-$PWD}" mkdir -p "$WORKSPACE_ROOT/dist/windows" cp "$WORKSPACE_ROOT/yt-playlist-main.py" "$WORKSPACE_ROOT/dist/windows/" @@ -57,7 +55,7 @@ jobs: echo "ZIP_PATH=$WORKSPACE_ROOT/$ZIP_NAME" >> $GITHUB_ENV - name: Upload Windows artifact - uses: christopherhx/gitea-upload-artifact@v4 + uses: actions/upload-artifact@v4 with: name: windows-zip path: ${{ env.ZIP_PATH }} @@ -74,7 +72,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: https://gitea.com/actions/checkout@v5 + uses: actions/checkout@v5 - name: Install dependencies run: | @@ -85,14 +83,14 @@ jobs: - name: Extract tag name run: | - REF="${GITEA_REF:-$GITHUB_REF}" + REF="${GITHUB_REF}" TAG="${REF#refs/tags/}" echo "TAG=$TAG" >> $GITHUB_ENV - name: Prepare Linux package run: | set -e - WORKSPACE_ROOT="${GITEA_WORKSPACE:-$PWD}" + WORKSPACE_ROOT="${GITHUB_WORKSPACE:-$PWD}" mkdir -p "$WORKSPACE_ROOT/dist/linux" cp "$WORKSPACE_ROOT/yt-playlist-main.py" "$WORKSPACE_ROOT/dist/linux/" @@ -138,7 +136,7 @@ jobs: echo "ZIP_PATH=$WORKSPACE_ROOT/$ZIP_NAME" >> $GITHUB_ENV - name: Upload Linux artifact - uses: christopherhx/gitea-upload-artifact@v4 + uses: actions/upload-artifact@v4 with: name: linux-zip path: ${{ env.ZIP_PATH }} @@ -152,17 +150,17 @@ jobs: IMAGE_NAME: youtube-playlist-downloader steps: - name: Checkout code - uses: https://gitea.com/actions/checkout@v5 + uses: actions/checkout@v5 - name: Extract tag name run: | - set -e - REF="${GITEA_REF:-$GITHUB_REF}" + set -e + REF="${GITHUB_REF}" TAG="${REF#refs/tags/}" echo "TAG=$TAG" >> $GITHUB_ENV - name: Download linux-zip artifact - uses: christopherhx/gitea-download-artifact@v4 + uses: actions/download-artifact@v4 with: name: linux-zip @@ -179,7 +177,7 @@ jobs: docker save -o docker-image.tar ${{ env.REGISTRY_URL }}/${{ env.REGISTRY_OWNER }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} - name: Upload docker-image-${TAG} artifact - uses: christopherhx/gitea-upload-artifact@v4 + uses: actions/upload-artifact@v4 with: name: docker-image path: docker-image.tar @@ -192,7 +190,7 @@ jobs: docker save -o docker-image-latest.tar ${{ env.REGISTRY_URL }}/${{ env.REGISTRY_OWNER }}/${{ env.IMAGE_NAME }}:latest - name: Upload docker-image-latest artifact - uses: christopherhx/gitea-upload-artifact@v4 + uses: actions/upload-artifact@v4 with: name: docker-image-latest path: docker-image-latest.tar @@ -207,16 +205,16 @@ jobs: IMAGE_NAME: youtube-playlist-downloader steps: - name: Download all artifacts - uses: christopherhx/gitea-download-artifact@v4 + uses: actions/download-artifact@v4 - name: Extract tag name run: | - REF="${GITEA_REF:-$GITHUB_REF}" + REF="${GITHUB_REF}" TAG="${REF#refs/tags/}" echo "TAG=$TAG" >> $GITHUB_ENV - name: Login to the Container registry - uses: https://gitea.com/docker/login-action@v3 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY_URL }} username: ${{ env.REGISTRY_OWNER }} @@ -238,12 +236,44 @@ jobs: - name: Push Docker image as latest run: docker push ${{ env.REGISTRY_URL }}/${{ env.REGISTRY_OWNER }}/${{ env.IMAGE_NAME }}:latest - - name: Publish release - uses: https://gitea.com/actions/gitea-release-action@v1 + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - draft: true tag_name: ${{ env.TAG }} - name: ${{ env.TAG }} - files: | - linux-zip/* - windows-zip/* \ No newline at end of file + release_name: ${{ env.TAG }} + draft: true + + - name: Upload Windows release asset + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: windows-zip/yt-playlist-windows-${{ env.TAG }}.zip + asset_name: yt-playlist-windows-${{ env.TAG }}.zip + asset_content_type: application/zip + + - name: Upload Linux release asset + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: linux-zip/yt-playlist-linux-${{ env.TAG }}.tar.gz + asset_name: yt-playlist-linux-${{ env.TAG }}.tar.gz + asset_content_type: application/gzip + + - name: Upload Docker image (release tag) + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: docker-image/docker-image.tar + asset_name: docker-image-${{ env.TAG }}.tar + asset_content_type: application/x-tar + + - name: Upload Docker image (latest) + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: docker-image-latest/docker-image-latest.tar + asset_name: docker-image-latest.tar + asset_content_type: application/x-tar \ No newline at end of file diff --git a/README.md b/README.md index 214f626..195e4df 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # YouTube Playlist Downloader -A cross-platform tool for downloading entire YouTube playlists as MP3 or MP4 files, using [yt-dlp](https://github.com/yt-dlp/yt-dlp), [ffmpeg](https://ffmpeg.org/), and [aria2c](https://github.com/aria2/aria2). Includes Gitea CI/CD workflow for packaging and releasing Windows and Linux binaries. + A cross-platform tool for downloading entire YouTube playlists as MP3 or MP4 files, using [yt-dlp](https://github.com/yt-dlp/yt-dlp), [ffmpeg](https://ffmpeg.org/), and [aria2c](https://github.com/aria2/aria2). Includes a GitHub Actions CI/CD workflow for packaging and releasing Windows and Linux binaries. Supports audio, video, or both download modes, music and videos are numbered as they are on your youtube playlist, playlist cleanup, and configurable parallel download options. @@ -16,7 +16,7 @@ Supports audio, video, or both download modes, music and videos are numbered as - **Cleanup of tracks:** Option to remove files not in playlist anymore, with confirmation. - **Configurable output paths** and archive tracking. - **Cross-platform:** Windows and Linux support. -- **Gitea CI/CD workflow** for automated packaging and release. +- **GitHub Actions CI/CD workflow** for automated packaging and release. --- @@ -32,7 +32,7 @@ Supports audio, video, or both download modes, music and videos are numbered as 1. **Download the latest release:** -- Go to the [Releases](https://git.darkzoul.org/dark_zoul/YouTube-Playlist-Downloader/releases) page. +- Go to the [Releases](https://github.com/darkzoul5/YoutubePlaylistDownloader/releases) page. - Download the appropriate archive for your platform (Windows or Linux). 1. **Unzip the archive:** @@ -108,7 +108,7 @@ Edit `yt-playlist-config.json` to specify playlists, paths, and options: - Offer to clean up files that are no longer in the playlist --- - + ## Docker Usage You can run YouTube Playlist Downloader using the official Docker image. @@ -116,7 +116,7 @@ You can run YouTube Playlist Downloader using the official Docker image. ### Run the container ```pwsh -docker run -v /path/to/downloads:/app/downloads -v /path/to/config:/app/config git.darkzoul.org/dark_zoul/youtube-playlist-downloader:latest +docker run -v /path/to/downloads:/app/downloads -v /path/to/config:/app/config ghcr.io/dark_zoul/YoutubePlaylistDownloader:latest ``` Replace `/path/to/downloads` and `/path/to/config` with your local directories. @@ -133,7 +133,7 @@ Create a `docker-compose.yml` with the following content (replace the host paths ```yaml services: yt-downloader: - image: git.darkzoul.org/dark_zoul/youtube-playlist-downloader:latest + image: ghcr.io/dark_zoul/YoutubePlaylistDownloader:latest container_name: yt-downloader restart: no volumes: @@ -166,4 +166,4 @@ See [LICENSE](LICENSE). - [yt-dlp](https://github.com/yt-dlp/yt-dlp) - [ffmpeg](https://ffmpeg.org/) -- [aria2c](https://github.com/aria2/aria2) \ No newline at end of file +- [aria2c](https://github.com/aria2/aria2) From e6eaa045bbe95ba5d1e96a0bd8177bb3c8037396 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 14:49:18 +0200 Subject: [PATCH 05/38] Update release workflow to use GitHub actor for Docker image registry and improve curl command reliability --- .github/workflows/release.yml | 36 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd9f901..2e6b71f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,15 +34,15 @@ jobs: mkdir -p "$WORKSPACE_ROOT/dist/windows/bin" # yt-dlp - curl -L -o "$WORKSPACE_ROOT/dist/windows/bin/yt-dlp.exe" https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe + curl -fL -o "$WORKSPACE_ROOT/dist/windows/bin/yt-dlp.exe" https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe # FFmpeg Windows static - curl -L -o "$WORKSPACE_ROOT/dist/windows/ffmpeg.zip" https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip + curl -fL -o "$WORKSPACE_ROOT/dist/windows/ffmpeg.zip" https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip unzip -q "$WORKSPACE_ROOT/dist/windows/ffmpeg.zip" -d "$WORKSPACE_ROOT/dist/windows/ffmpeg_temp" mv $(find "$WORKSPACE_ROOT/dist/windows/ffmpeg_temp" -name ffmpeg.exe | head -n 1) "$WORKSPACE_ROOT/dist/windows/bin/ffmpeg.exe" # aria2c Windows static - curl -L -o "$WORKSPACE_ROOT/dist/windows/aria2c.zip" https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip + curl -fL -o "$WORKSPACE_ROOT/dist/windows/aria2c.zip" https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip unzip "$WORKSPACE_ROOT/dist/windows/aria2c.zip" -d "$WORKSPACE_ROOT/dist/windows/" mv "$WORKSPACE_ROOT/dist/windows/aria2-1.37.0-win-64bit-build1/aria2c.exe" "$WORKSPACE_ROOT/dist/windows/bin/aria2c.exe" @@ -97,11 +97,11 @@ jobs: mkdir -p "$WORKSPACE_ROOT/dist/linux/bin" # yt-dlp - curl -L -o "$WORKSPACE_ROOT/dist/linux/bin/yt-dlp" https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux + curl -fL -o "$WORKSPACE_ROOT/dist/linux/bin/yt-dlp" https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux chmod +x "$WORKSPACE_ROOT/dist/linux/bin/yt-dlp" # FFmpeg Linux static - curl -L -o "$WORKSPACE_ROOT/dist/linux/ffmpeg.tar.xz" https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz + curl -fL -o "$WORKSPACE_ROOT/dist/linux/ffmpeg.tar.xz" https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz mkdir -p "$WORKSPACE_ROOT/dist/linux/ffmpeg_temp" tar -xf "$WORKSPACE_ROOT/dist/linux/ffmpeg.tar.xz" -C "$WORKSPACE_ROOT/dist/linux/ffmpeg_temp" --strip-components=1 mv "$WORKSPACE_ROOT/dist/linux/ffmpeg_temp/ffmpeg" "$WORKSPACE_ROOT/dist/linux/bin/ffmpeg" @@ -145,9 +145,8 @@ jobs: runs-on: ubuntu-latest needs: [build-linux-package] env: - REGISTRY_URL: git.darkzoul.org - REGISTRY_OWNER: dark_zoul - IMAGE_NAME: youtube-playlist-downloader + REGISTRY_URL: ghcr.io + IMAGE_NAME: youtubeplaylistdownloader steps: - name: Checkout code uses: actions/checkout@v5 @@ -170,11 +169,11 @@ jobs: tar -xzf yt-playlist-linux-${TAG}.tar.gz - name: Build Docker image with release tag - run: docker build ./ -t ${{ env.REGISTRY_URL }}/${{ env.REGISTRY_OWNER }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} + run: docker build ./ -t ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} - name: Save Docker image ${TAG} as tar run: | - docker save -o docker-image.tar ${{ env.REGISTRY_URL }}/${{ env.REGISTRY_OWNER }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} + docker save -o docker-image.tar ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} - name: Upload docker-image-${TAG} artifact uses: actions/upload-artifact@v4 @@ -183,11 +182,11 @@ jobs: path: docker-image.tar - name: Build Docker image as latest (distinct digest) - run: docker build ./ --label build_as_latest=true -t ${{ env.REGISTRY_URL }}/${{ env.REGISTRY_OWNER }}/${{ env.IMAGE_NAME }}:latest + run: docker build ./ --label build_as_latest=true -t ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:latest - name: Save Docker image as tar run: | - docker save -o docker-image-latest.tar ${{ env.REGISTRY_URL }}/${{ env.REGISTRY_OWNER }}/${{ env.IMAGE_NAME }}:latest + docker save -o docker-image-latest.tar ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:latest - name: Upload docker-image-latest artifact uses: actions/upload-artifact@v4 @@ -200,9 +199,8 @@ jobs: runs-on: ubuntu-latest needs: [build-windows-package, build-linux-package, build-docker-image] env: - REGISTRY_URL: git.darkzoul.org - REGISTRY_OWNER: dark_zoul - IMAGE_NAME: youtube-playlist-downloader + REGISTRY_URL: ghcr.io + IMAGE_NAME: youtubeplaylistdownloader steps: - name: Download all artifacts uses: actions/download-artifact@v4 @@ -217,8 +215,8 @@ jobs: uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY_URL }} - username: ${{ env.REGISTRY_OWNER }} - password: ${{ secrets.MY_REGISTRY_ACCESS_TOKEN }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Load docker image from tar run: | @@ -226,7 +224,7 @@ jobs: docker load -i docker-image/docker-image.tar - name: Push Docker image with release tag - run: docker push ${{ env.REGISTRY_URL }}/${{ env.REGISTRY_OWNER }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} + run: docker push ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} - name: Load docker image from tar run: | @@ -234,7 +232,7 @@ jobs: docker load -i docker-image-latest/docker-image-latest.tar - name: Push Docker image as latest - run: docker push ${{ env.REGISTRY_URL }}/${{ env.REGISTRY_OWNER }}/${{ env.IMAGE_NAME }}:latest + run: docker push ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:latest - name: Create GitHub Release id: create_release From 837f8275cde6663e8fd8b69a9f0c627be55b7a8e Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 16:12:27 +0200 Subject: [PATCH 06/38] Update release workflow to extract Linux artifact from the correct directory and upgrade upload-release-asset action to v2 --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e6b71f..5ae9300 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -166,7 +166,7 @@ jobs: - name: Extract linux-zip artifact run: | set -e - tar -xzf yt-playlist-linux-${TAG}.tar.gz + tar -xzf linux-zip/yt-playlist-linux-${TAG}.tar.gz - name: Build Docker image with release tag run: docker build ./ -t ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} @@ -245,7 +245,7 @@ jobs: draft: true - name: Upload Windows release asset - uses: actions/upload-release-asset@v1 + uses: actions/upload-release-asset@v2 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: windows-zip/yt-playlist-windows-${{ env.TAG }}.zip @@ -253,7 +253,7 @@ jobs: asset_content_type: application/zip - name: Upload Linux release asset - uses: actions/upload-release-asset@v1 + uses: actions/upload-release-asset@v2 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: linux-zip/yt-playlist-linux-${{ env.TAG }}.tar.gz @@ -261,7 +261,7 @@ jobs: asset_content_type: application/gzip - name: Upload Docker image (release tag) - uses: actions/upload-release-asset@v1 + uses: actions/upload-release-asset@v2 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: docker-image/docker-image.tar @@ -269,7 +269,7 @@ jobs: asset_content_type: application/x-tar - name: Upload Docker image (latest) - uses: actions/upload-release-asset@v1 + uses: actions/upload-release-asset@v2 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: docker-image-latest/docker-image-latest.tar From 6ca8b8462984b5e675c218edd826a252667d7b34 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 16:16:33 +0200 Subject: [PATCH 07/38] Refactor Linux package preparation in release workflow to improve caching and cleanup processes --- .github/workflows/release.yml | 72 +++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ae9300..337eacf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -80,56 +80,72 @@ jobs: sudo apt install -y unzip zip curl wget build-essential \ pkg-config libssl-dev zlib1g-dev - - name: Extract tag name run: | REF="${GITHUB_REF}" TAG="${REF#refs/tags/}" echo "TAG=$TAG" >> $GITHUB_ENV - - name: Prepare Linux package + - name: Prepare workspace run: | set -e WORKSPACE_ROOT="${GITHUB_WORKSPACE:-$PWD}" - mkdir -p "$WORKSPACE_ROOT/dist/linux" + mkdir -p "$WORKSPACE_ROOT/dist/linux/bin" cp "$WORKSPACE_ROOT/yt-playlist-main.py" "$WORKSPACE_ROOT/dist/linux/" - mkdir -p "$WORKSPACE_ROOT/dist/linux/bin" - - # yt-dlp + - name: Download yt-dlp + run: | curl -fL -o "$WORKSPACE_ROOT/dist/linux/bin/yt-dlp" https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux chmod +x "$WORKSPACE_ROOT/dist/linux/bin/yt-dlp" - # FFmpeg Linux static + - name: Download FFmpeg static + run: | curl -fL -o "$WORKSPACE_ROOT/dist/linux/ffmpeg.tar.xz" https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz mkdir -p "$WORKSPACE_ROOT/dist/linux/ffmpeg_temp" tar -xf "$WORKSPACE_ROOT/dist/linux/ffmpeg.tar.xz" -C "$WORKSPACE_ROOT/dist/linux/ffmpeg_temp" --strip-components=1 mv "$WORKSPACE_ROOT/dist/linux/ffmpeg_temp/ffmpeg" "$WORKSPACE_ROOT/dist/linux/bin/ffmpeg" chmod +x "$WORKSPACE_ROOT/dist/linux/bin/ffmpeg" - # aria2c minimal static - mkdir -p "$WORKSPACE_ROOT/dist/linux/aria2c_build" - cd "$WORKSPACE_ROOT" - wget https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0.tar.gz - tar -xzf aria2-1.37.0.tar.gz - cd aria2-1.37.0 - CFLAGS="-Os -s" LDFLAGS="-static" ./configure \ - --enable-static --disable-shared \ - --disable-libaria2 --without-ca-bundle \ - --without-libnettle --without-libgcrypt \ - --without-libssh2 --without-libexpat \ - --without-libxml2 --without-libsqlite3 \ - --with-openssl - make -j"$(nproc)" - strip src/aria2c - - cp src/aria2c "$WORKSPACE_ROOT/dist/linux/bin/aria2c" - chmod +x "$WORKSPACE_ROOT/dist/linux/bin/aria2c" + - name: Cache aria2c binary + uses: actions/cache@v3 + with: + path: dist/linux/bin/aria2c + key: aria2c-latest + restore-keys: | + aria2c- - # Cleanup - rm -rf "$WORKSPACE_ROOT/dist/linux/ffmpeg_temp" "$WORKSPACE_ROOT/dist/linux/aria2c_build" "$WORKSPACE_ROOT/dist/linux/ffmpeg.tar.xz" "$WORKSPACE_ROOT/aria2-1.37.0" "$WORKSPACE_ROOT/aria2-1.37.0.tar.gz" + - name: Build aria2c if not cached + run: | + set -e + WORKSPACE_ROOT="${GITHUB_WORKSPACE:-$PWD}" + if [ ! -f "$WORKSPACE_ROOT/dist/linux/bin/aria2c" ]; then + mkdir -p "$WORKSPACE_ROOT/dist/linux/aria2c_build" + cd "$WORKSPACE_ROOT" + wget https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0.tar.gz + tar -xzf aria2-1.37.0.tar.gz + cd aria2-1.37.0 + CFLAGS="-Os -s" LDFLAGS="-static" ./configure \ + --enable-static --disable-shared \ + --disable-libaria2 --without-ca-bundle \ + --without-libnettle --without-libgcrypt \ + --without-libssh2 --without-libexpat \ + --without-libxml2 --without-libsqlite3 \ + --with-openssl + make -j"$(nproc)" + strip src/aria2c + cp src/aria2c "$WORKSPACE_ROOT/dist/linux/bin/aria2c" + chmod +x "$WORKSPACE_ROOT/dist/linux/bin/aria2c" + # Cleanup build folders + rm -rf "$WORKSPACE_ROOT/dist/linux/aria2c_build" "$WORKSPACE_ROOT/aria2-1.37.0" "$WORKSPACE_ROOT/aria2-1.37.0.tar.gz" + fi - # GZip everything + - name: Cleanup FFmpeg temp + run: | + rm -rf "$WORKSPACE_ROOT/dist/linux/ffmpeg_temp" "$WORKSPACE_ROOT/dist/linux/ffmpeg.tar.xz" + + - name: Create tar.gz package + run: | + WORKSPACE_ROOT="${GITHUB_WORKSPACE:-$PWD}" cd "$WORKSPACE_ROOT/dist/linux" ZIP_NAME="yt-playlist-linux-${TAG}.tar.gz" tar -czf "$WORKSPACE_ROOT/$ZIP_NAME" * From 13eff5ef503868b38876d651d2450cf3f686215c Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 16:24:35 +0200 Subject: [PATCH 08/38] Refactor Windows and Linux package preparation in release workflow to use GITHUB_WORKSPACE for consistency --- .github/workflows/release.yml | 73 +++++++++++++++++------------------ 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 337eacf..1a72d37 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,32 +27,32 @@ jobs: - name: Prepare Windows package run: | set -e - WORKSPACE_ROOT="${GITHUB_WORKSPACE:-$PWD}" - mkdir -p "$WORKSPACE_ROOT/dist/windows" - cp "$WORKSPACE_ROOT/yt-playlist-main.py" "$WORKSPACE_ROOT/dist/windows/" + + mkdir -p "$GITHUB_WORKSPACE/dist/windows" + cp "$GITHUB_WORKSPACE/yt-playlist-main.py" "$GITHUB_WORKSPACE/dist/windows/" - mkdir -p "$WORKSPACE_ROOT/dist/windows/bin" + mkdir -p "$GITHUB_WORKSPACE/dist/windows/bin" # yt-dlp - curl -fL -o "$WORKSPACE_ROOT/dist/windows/bin/yt-dlp.exe" https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe + curl -fL -o "$GITHUB_WORKSPACE/dist/windows/bin/yt-dlp.exe" https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe # FFmpeg Windows static - curl -fL -o "$WORKSPACE_ROOT/dist/windows/ffmpeg.zip" https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip - unzip -q "$WORKSPACE_ROOT/dist/windows/ffmpeg.zip" -d "$WORKSPACE_ROOT/dist/windows/ffmpeg_temp" - mv $(find "$WORKSPACE_ROOT/dist/windows/ffmpeg_temp" -name ffmpeg.exe | head -n 1) "$WORKSPACE_ROOT/dist/windows/bin/ffmpeg.exe" + curl -fL -o "$GITHUB_WORKSPACE/dist/windows/ffmpeg.zip" https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip + unzip -q "$GITHUB_WORKSPACE/dist/windows/ffmpeg.zip" -d "$GITHUB_WORKSPACE/dist/windows/ffmpeg_temp" + mv $(find "$GITHUB_WORKSPACE/dist/windows/ffmpeg_temp" -name ffmpeg.exe | head -n 1) "$GITHUB_WORKSPACE/dist/windows/bin/ffmpeg.exe" # aria2c Windows static - curl -fL -o "$WORKSPACE_ROOT/dist/windows/aria2c.zip" https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip - unzip "$WORKSPACE_ROOT/dist/windows/aria2c.zip" -d "$WORKSPACE_ROOT/dist/windows/" - mv "$WORKSPACE_ROOT/dist/windows/aria2-1.37.0-win-64bit-build1/aria2c.exe" "$WORKSPACE_ROOT/dist/windows/bin/aria2c.exe" + curl -fL -o "$GITHUB_WORKSPACE/dist/windows/aria2c.zip" https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip + unzip "$GITHUB_WORKSPACE/dist/windows/aria2c.zip" -d "$GITHUB_WORKSPACE/dist/windows/" + mv "$GITHUB_WORKSPACE/dist/windows/aria2-1.37.0-win-64bit-build1/aria2c.exe" "$GITHUB_WORKSPACE/dist/windows/bin/aria2c.exe" # Remove temp files before zipping - rm -rf "$WORKSPACE_ROOT/dist/windows/ffmpeg_temp" "$WORKSPACE_ROOT/dist/windows/aria2-1.37.0-win-64bit-build1" "$WORKSPACE_ROOT/dist/windows/ffmpeg.zip" "$WORKSPACE_ROOT/dist/windows/aria2c.zip" + rm -rf "$GITHUB_WORKSPACE/dist/windows/ffmpeg_temp" "$GITHUB_WORKSPACE/dist/windows/aria2-1.37.0-win-64bit-build1" "$GITHUB_WORKSPACE/dist/windows/ffmpeg.zip" "$GITHUB_WORKSPACE/dist/windows/aria2c.zip" - cd "$WORKSPACE_ROOT/dist/windows" + cd "$GITHUB_WORKSPACE/dist/windows" ZIP_NAME="yt-playlist-windows-${TAG}.zip" - zip -r "$WORKSPACE_ROOT/$ZIP_NAME" * - echo "ZIP_PATH=$WORKSPACE_ROOT/$ZIP_NAME" >> $GITHUB_ENV + zip -r "$GITHUB_WORKSPACE/$ZIP_NAME" * + echo "ZIP_PATH=$GITHUB_WORKSPACE/$ZIP_NAME" >> $GITHUB_ENV - name: Upload Windows artifact uses: actions/upload-artifact@v4 @@ -89,22 +89,22 @@ jobs: - name: Prepare workspace run: | set -e - WORKSPACE_ROOT="${GITHUB_WORKSPACE:-$PWD}" - mkdir -p "$WORKSPACE_ROOT/dist/linux/bin" - cp "$WORKSPACE_ROOT/yt-playlist-main.py" "$WORKSPACE_ROOT/dist/linux/" + + mkdir -p "$GITHUB_WORKSPACE/dist/linux/bin" + cp "$GITHUB_WORKSPACE/yt-playlist-main.py" "$GITHUB_WORKSPACE/dist/linux/" - name: Download yt-dlp run: | - curl -fL -o "$WORKSPACE_ROOT/dist/linux/bin/yt-dlp" https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux - chmod +x "$WORKSPACE_ROOT/dist/linux/bin/yt-dlp" + curl -fL -o "$GITHUB_WORKSPACE/dist/linux/bin/yt-dlp" https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux + chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/yt-dlp" - name: Download FFmpeg static run: | - curl -fL -o "$WORKSPACE_ROOT/dist/linux/ffmpeg.tar.xz" https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz - mkdir -p "$WORKSPACE_ROOT/dist/linux/ffmpeg_temp" - tar -xf "$WORKSPACE_ROOT/dist/linux/ffmpeg.tar.xz" -C "$WORKSPACE_ROOT/dist/linux/ffmpeg_temp" --strip-components=1 - mv "$WORKSPACE_ROOT/dist/linux/ffmpeg_temp/ffmpeg" "$WORKSPACE_ROOT/dist/linux/bin/ffmpeg" - chmod +x "$WORKSPACE_ROOT/dist/linux/bin/ffmpeg" + curl -fL -o "$GITHUB_WORKSPACE/dist/linux/ffmpeg.tar.xz" https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz + mkdir -p "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp" + tar -xf "$GITHUB_WORKSPACE/dist/linux/ffmpeg.tar.xz" -C "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp" --strip-components=1 + mv "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp/ffmpeg" "$GITHUB_WORKSPACE/dist/linux/bin/ffmpeg" + chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/ffmpeg" - name: Cache aria2c binary uses: actions/cache@v3 @@ -117,10 +117,9 @@ jobs: - name: Build aria2c if not cached run: | set -e - WORKSPACE_ROOT="${GITHUB_WORKSPACE:-$PWD}" - if [ ! -f "$WORKSPACE_ROOT/dist/linux/bin/aria2c" ]; then - mkdir -p "$WORKSPACE_ROOT/dist/linux/aria2c_build" - cd "$WORKSPACE_ROOT" + if [ ! -f "$GITHUB_WORKSPACE/dist/linux/bin/aria2c" ]; then + mkdir -p "$GITHUB_WORKSPACE/dist/linux/aria2c_build" + cd "$GITHUB_WORKSPACE" wget https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0.tar.gz tar -xzf aria2-1.37.0.tar.gz cd aria2-1.37.0 @@ -133,23 +132,23 @@ jobs: --with-openssl make -j"$(nproc)" strip src/aria2c - cp src/aria2c "$WORKSPACE_ROOT/dist/linux/bin/aria2c" - chmod +x "$WORKSPACE_ROOT/dist/linux/bin/aria2c" + cp src/aria2c "$GITHUB_WORKSPACE/dist/linux/bin/aria2c" + chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/aria2c" # Cleanup build folders - rm -rf "$WORKSPACE_ROOT/dist/linux/aria2c_build" "$WORKSPACE_ROOT/aria2-1.37.0" "$WORKSPACE_ROOT/aria2-1.37.0.tar.gz" + rm -rf "$GITHUB_WORKSPACE/dist/linux/aria2c_build" "$GITHUB_WORKSPACE/aria2-1.37.0" "$GITHUB_WORKSPACE/aria2-1.37.0.tar.gz" fi - name: Cleanup FFmpeg temp run: | - rm -rf "$WORKSPACE_ROOT/dist/linux/ffmpeg_temp" "$WORKSPACE_ROOT/dist/linux/ffmpeg.tar.xz" + rm -rf "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp" "$GITHUB_WORKSPACE/dist/linux/ffmpeg.tar.xz" - name: Create tar.gz package run: | - WORKSPACE_ROOT="${GITHUB_WORKSPACE:-$PWD}" - cd "$WORKSPACE_ROOT/dist/linux" + + cd "$GITHUB_WORKSPACE/dist/linux" ZIP_NAME="yt-playlist-linux-${TAG}.tar.gz" - tar -czf "$WORKSPACE_ROOT/$ZIP_NAME" * - echo "ZIP_PATH=$WORKSPACE_ROOT/$ZIP_NAME" >> $GITHUB_ENV + tar -czf "$GITHUB_WORKSPACE/$ZIP_NAME" * + echo "ZIP_PATH=$GITHUB_WORKSPACE/$ZIP_NAME" >> $GITHUB_ENV - name: Upload Linux artifact uses: actions/upload-artifact@v4 From 99c825125776bfafb7ef23a9c21a752a921223ed Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 16:36:13 +0200 Subject: [PATCH 09/38] Add User-Agent header to curl commands --- .github/workflows/release.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1a72d37..c73fed1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,15 +34,24 @@ jobs: mkdir -p "$GITHUB_WORKSPACE/dist/windows/bin" # yt-dlp - curl -fL -o "$GITHUB_WORKSPACE/dist/windows/bin/yt-dlp.exe" https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe + curl -fL \ + -H "User-Agent: github-actions" \ + -o "$GITHUB_WORKSPACE/dist/windows/bin/yt-dlp.exe" \ + https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe # FFmpeg Windows static - curl -fL -o "$GITHUB_WORKSPACE/dist/windows/ffmpeg.zip" https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip + curl -fL \ + -H "User-Agent: github-actions" \ + -o "$GITHUB_WORKSPACE/dist/windows/ffmpeg.zip" \ + https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip unzip -q "$GITHUB_WORKSPACE/dist/windows/ffmpeg.zip" -d "$GITHUB_WORKSPACE/dist/windows/ffmpeg_temp" mv $(find "$GITHUB_WORKSPACE/dist/windows/ffmpeg_temp" -name ffmpeg.exe | head -n 1) "$GITHUB_WORKSPACE/dist/windows/bin/ffmpeg.exe" # aria2c Windows static - curl -fL -o "$GITHUB_WORKSPACE/dist/windows/aria2c.zip" https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip + curl -fL \ + -H "User-Agent: github-actions" \ + -o "$GITHUB_WORKSPACE/dist/windows/aria2c.zip" \ + https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip unzip "$GITHUB_WORKSPACE/dist/windows/aria2c.zip" -d "$GITHUB_WORKSPACE/dist/windows/" mv "$GITHUB_WORKSPACE/dist/windows/aria2-1.37.0-win-64bit-build1/aria2c.exe" "$GITHUB_WORKSPACE/dist/windows/bin/aria2c.exe" @@ -95,12 +104,18 @@ jobs: - name: Download yt-dlp run: | - curl -fL -o "$GITHUB_WORKSPACE/dist/linux/bin/yt-dlp" https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux + curl -fL \ + -H "User-Agent: github-actions" \ + -o "$GITHUB_WORKSPACE/dist/linux/bin/yt-dlp" \ + https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/yt-dlp" - name: Download FFmpeg static run: | - curl -fL -o "$GITHUB_WORKSPACE/dist/linux/ffmpeg.tar.xz" https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz + curl -fL \ + -H "User-Agent: github-actions" \ + -o "$GITHUB_WORKSPACE/dist/linux/ffmpeg.tar.xz" \ + https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz mkdir -p "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp" tar -xf "$GITHUB_WORKSPACE/dist/linux/ffmpeg.tar.xz" -C "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp" --strip-components=1 mv "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp/ffmpeg" "$GITHUB_WORKSPACE/dist/linux/bin/ffmpeg" From 02356b191f3e7b162a6eccb27030bf7b9a542a38 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 16:39:50 +0200 Subject: [PATCH 10/38] Refactor tag extraction to handle both tags and branches in release workflow --- .github/workflows/release.yml | 53 ++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c73fed1..941663c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,11 +18,16 @@ jobs: sudo apt update sudo apt install -y unzip zip curl - - name: Extract tag name + - name: Extract ref name run: | - REF="${GITHUB_REF}" - TAG="${REF#refs/tags/}" - echo "TAG=$TAG" >> $GITHUB_ENV + if [[ "$GITHUB_REF" == refs/tags/* ]]; then + REF_NAME="${GITHUB_REF#refs/tags/}" + elif [[ "$GITHUB_REF" == refs/heads/* ]]; then + REF_NAME="${GITHUB_REF#refs/heads/}" + else + REF_NAME="unknown" + fi + echo "TAG=$REF_NAME" >> $GITHUB_ENV - name: Prepare Windows package run: | @@ -89,11 +94,16 @@ jobs: sudo apt install -y unzip zip curl wget build-essential \ pkg-config libssl-dev zlib1g-dev - - name: Extract tag name + - name: Extract ref name run: | - REF="${GITHUB_REF}" - TAG="${REF#refs/tags/}" - echo "TAG=$TAG" >> $GITHUB_ENV + if [[ "$GITHUB_REF" == refs/tags/* ]]; then + REF_NAME="${GITHUB_REF#refs/tags/}" + elif [[ "$GITHUB_REF" == refs/heads/* ]]; then + REF_NAME="${GITHUB_REF#refs/heads/}" + else + REF_NAME="unknown" + fi + echo "TAG=$REF_NAME" >> $GITHUB_ENV - name: Prepare workspace run: | @@ -181,12 +191,16 @@ jobs: - name: Checkout code uses: actions/checkout@v5 - - name: Extract tag name + - name: Extract ref name run: | - set -e - REF="${GITHUB_REF}" - TAG="${REF#refs/tags/}" - echo "TAG=$TAG" >> $GITHUB_ENV + if [[ "$GITHUB_REF" == refs/tags/* ]]; then + REF_NAME="${GITHUB_REF#refs/tags/}" + elif [[ "$GITHUB_REF" == refs/heads/* ]]; then + REF_NAME="${GITHUB_REF#refs/heads/}" + else + REF_NAME="unknown" + fi + echo "TAG=$REF_NAME" >> $GITHUB_ENV - name: Download linux-zip artifact uses: actions/download-artifact@v4 @@ -235,11 +249,16 @@ jobs: - name: Download all artifacts uses: actions/download-artifact@v4 - - name: Extract tag name + - name: Extract ref name run: | - REF="${GITHUB_REF}" - TAG="${REF#refs/tags/}" - echo "TAG=$TAG" >> $GITHUB_ENV + if [[ "$GITHUB_REF" == refs/tags/* ]]; then + REF_NAME="${GITHUB_REF#refs/tags/}" + elif [[ "$GITHUB_REF" == refs/heads/* ]]; then + REF_NAME="${GITHUB_REF#refs/heads/}" + else + REF_NAME="unknown" + fi + echo "TAG=$REF_NAME" >> $GITHUB_ENV - name: Login to the Container registry uses: docker/login-action@v3 From 4b04f0af36bf7b3a7003f8a0a63b43247590d278 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 17:34:02 +0200 Subject: [PATCH 11/38] Remove tar.gz package creation and extraction steps from Linux build workflow --- .github/workflows/release.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 941663c..d5bb30a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -167,14 +167,6 @@ jobs: run: | rm -rf "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp" "$GITHUB_WORKSPACE/dist/linux/ffmpeg.tar.xz" - - name: Create tar.gz package - run: | - - cd "$GITHUB_WORKSPACE/dist/linux" - ZIP_NAME="yt-playlist-linux-${TAG}.tar.gz" - tar -czf "$GITHUB_WORKSPACE/$ZIP_NAME" * - echo "ZIP_PATH=$GITHUB_WORKSPACE/$ZIP_NAME" >> $GITHUB_ENV - - name: Upload Linux artifact uses: actions/upload-artifact@v4 with: @@ -207,11 +199,6 @@ jobs: with: name: linux-zip - - name: Extract linux-zip artifact - run: | - set -e - tar -xzf linux-zip/yt-playlist-linux-${TAG}.tar.gz - - name: Build Docker image with release tag run: docker build ./ -t ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} From 8f5b90e1758e62b54e6d926cfbff1001fe2c92b7 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 18:03:14 +0200 Subject: [PATCH 12/38] Remove Windows package zipping step from release workflow --- .github/workflows/release.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d5bb30a..75cfa33 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,11 +63,6 @@ jobs: # Remove temp files before zipping rm -rf "$GITHUB_WORKSPACE/dist/windows/ffmpeg_temp" "$GITHUB_WORKSPACE/dist/windows/aria2-1.37.0-win-64bit-build1" "$GITHUB_WORKSPACE/dist/windows/ffmpeg.zip" "$GITHUB_WORKSPACE/dist/windows/aria2c.zip" - cd "$GITHUB_WORKSPACE/dist/windows" - ZIP_NAME="yt-playlist-windows-${TAG}.zip" - zip -r "$GITHUB_WORKSPACE/$ZIP_NAME" * - echo "ZIP_PATH=$GITHUB_WORKSPACE/$ZIP_NAME" >> $GITHUB_ENV - - name: Upload Windows artifact uses: actions/upload-artifact@v4 with: From 01ea0db145c0883272374c3d164e6773d7539636 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 18:51:33 +0200 Subject: [PATCH 13/38] reintroduce zip/unzip steps for Windows and Linux artifacts in release workflow --- .github/workflows/release.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75cfa33..0797b4d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,6 +63,12 @@ jobs: # Remove temp files before zipping rm -rf "$GITHUB_WORKSPACE/dist/windows/ffmpeg_temp" "$GITHUB_WORKSPACE/dist/windows/aria2-1.37.0-win-64bit-build1" "$GITHUB_WORKSPACE/dist/windows/ffmpeg.zip" "$GITHUB_WORKSPACE/dist/windows/aria2c.zip" + # Create windows archive + cd "$GITHUB_WORKSPACE/dist/windows" + ZIP_NAME="yt-playlist-windows-${TAG}.zip" + zip -r "$GITHUB_WORKSPACE/$ZIP_NAME" * + echo "ZIP_PATH=$GITHUB_WORKSPACE/$ZIP_NAME" >> $GITHUB_ENV + - name: Upload Windows artifact uses: actions/upload-artifact@v4 with: @@ -162,6 +168,14 @@ jobs: run: | rm -rf "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp" "$GITHUB_WORKSPACE/dist/linux/ffmpeg.tar.xz" + - name: Archive Linux package + run: | + set -e + cd "$GITHUB_WORKSPACE/dist/linux" + ZIP_NAME="yt-playlist-linux-${TAG}.tar.gz" + tar -czf "$GITHUB_WORKSPACE/$ZIP_NAME" * + echo "ZIP_PATH=$GITHUB_WORKSPACE/$ZIP_NAME" >> $GITHUB_ENV + - name: Upload Linux artifact uses: actions/upload-artifact@v4 with: @@ -194,6 +208,11 @@ jobs: with: name: linux-zip + - name: Extract linux artifact + run: | + set -e + tar -xzf linux-zip/yt-playlist-linux-${TAG}.tar.gz -C . + - name: Build Docker image with release tag run: docker build ./ -t ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} From d935b215227e4d5943d3eb1188cf2208821e9dae Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 18:56:11 +0200 Subject: [PATCH 14/38] Update artifact paths for Windows and Linux uploads in release workflow --- .github/workflows/release.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0797b4d..c7042fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,7 +73,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: windows-zip - path: ${{ env.ZIP_PATH }} + path: $GITHUB_WORKSPACE/yt-playlist-windows-*.zip @@ -174,13 +174,12 @@ jobs: cd "$GITHUB_WORKSPACE/dist/linux" ZIP_NAME="yt-playlist-linux-${TAG}.tar.gz" tar -czf "$GITHUB_WORKSPACE/$ZIP_NAME" * - echo "ZIP_PATH=$GITHUB_WORKSPACE/$ZIP_NAME" >> $GITHUB_ENV - name: Upload Linux artifact uses: actions/upload-artifact@v4 with: name: linux-zip - path: ${{ env.ZIP_PATH }} + path: $GITHUB_WORKSPACE/yt-playlist-linux-*.tar.gz build-docker-image: runs-on: ubuntu-latest @@ -211,7 +210,7 @@ jobs: - name: Extract linux artifact run: | set -e - tar -xzf linux-zip/yt-playlist-linux-${TAG}.tar.gz -C . + tar -xzf linux-zip/yt-playlist-linux-*.tar.gz -C . - name: Build Docker image with release tag run: docker build ./ -t ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} From 0f74bf6606d5a44ce31ca7df28e450233961b25b Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 19:05:22 +0200 Subject: [PATCH 15/38] Add input for release tag in workflow dispatch and update artifact paths --- .github/workflows/release.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c7042fc..fe70ec9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,12 @@ on: #tags: #- "v*.*.*" workflow_dispatch: - + inputs: + tag: + description: "Release tag (e.g., v0.1.0)" + required: true + type: string + jobs: build-windows-package: runs-on: ubuntu-latest @@ -73,7 +78,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: windows-zip - path: $GITHUB_WORKSPACE/yt-playlist-windows-*.zip + path: ${{ github.workspace }}/yt-playlist-windows-*.zip @@ -179,7 +184,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: linux-zip - path: $GITHUB_WORKSPACE/yt-playlist-linux-*.tar.gz + path: ${{ github.workspace }}/yt-playlist-linux-*.tar.gz build-docker-image: runs-on: ubuntu-latest From 16cc0ac1ffb05ae1d460d0ceee90783587872c3d Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 19:09:43 +0200 Subject: [PATCH 16/38] AI: Refactor version extraction logic in release workflow to streamline tag handling --- .github/workflows/release.yml | 109 +++++++++++++++++++--------------- 1 file changed, 62 insertions(+), 47 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe70ec9..221c3bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,21 +23,24 @@ jobs: sudo apt update sudo apt install -y unzip zip curl - - name: Extract ref name + - name: Get version from tag + id: version + shell: bash run: | - if [[ "$GITHUB_REF" == refs/tags/* ]]; then - REF_NAME="${GITHUB_REF#refs/tags/}" - elif [[ "$GITHUB_REF" == refs/heads/* ]]; then - REF_NAME="${GITHUB_REF#refs/heads/}" + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + VERSION="${{ inputs.tag }}" + elif [ "${{ github.event_name }}" = "release" ]; then + VERSION="${{ github.event.release.tag_name }}" else - REF_NAME="unknown" + VERSION="${{ github.ref_name }}" fi - echo "TAG=$REF_NAME" >> $GITHUB_ENV + VERSION="${VERSION#v}" + echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Prepare Windows package run: | set -e - + VERSION="${{ steps.version.outputs.version }}" mkdir -p "$GITHUB_WORKSPACE/dist/windows" cp "$GITHUB_WORKSPACE/yt-playlist-main.py" "$GITHUB_WORKSPACE/dist/windows/" @@ -70,7 +73,7 @@ jobs: # Create windows archive cd "$GITHUB_WORKSPACE/dist/windows" - ZIP_NAME="yt-playlist-windows-${TAG}.zip" + ZIP_NAME="yt-playlist-windows-${VERSION}.zip" zip -r "$GITHUB_WORKSPACE/$ZIP_NAME" * echo "ZIP_PATH=$GITHUB_WORKSPACE/$ZIP_NAME" >> $GITHUB_ENV @@ -94,22 +97,27 @@ jobs: - name: Checkout code uses: actions/checkout@v5 + - name: Get version from tag + id: version + shell: bash + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + VERSION="${{ inputs.tag }}" + elif [ "${{ github.event_name }}" = "release" ]; then + VERSION="${{ github.event.release.tag_name }}" + else + VERSION="${{ github.ref_name }}" + fi + VERSION="${VERSION#v}" + echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Install dependencies run: | sudo apt update sudo apt install -y unzip zip curl wget build-essential \ pkg-config libssl-dev zlib1g-dev - - name: Extract ref name - run: | - if [[ "$GITHUB_REF" == refs/tags/* ]]; then - REF_NAME="${GITHUB_REF#refs/tags/}" - elif [[ "$GITHUB_REF" == refs/heads/* ]]; then - REF_NAME="${GITHUB_REF#refs/heads/}" - else - REF_NAME="unknown" - fi - echo "TAG=$REF_NAME" >> $GITHUB_ENV + - name: Prepare workspace run: | @@ -176,8 +184,9 @@ jobs: - name: Archive Linux package run: | set -e + VERSION="${{ steps.version.outputs.version }}" cd "$GITHUB_WORKSPACE/dist/linux" - ZIP_NAME="yt-playlist-linux-${TAG}.tar.gz" + ZIP_NAME="yt-playlist-linux-${VERSION}.tar.gz" tar -czf "$GITHUB_WORKSPACE/$ZIP_NAME" * - name: Upload Linux artifact @@ -196,17 +205,20 @@ jobs: - name: Checkout code uses: actions/checkout@v5 - - name: Extract ref name + - name: Get version from tag + id: version + shell: bash run: | - if [[ "$GITHUB_REF" == refs/tags/* ]]; then - REF_NAME="${GITHUB_REF#refs/tags/}" - elif [[ "$GITHUB_REF" == refs/heads/* ]]; then - REF_NAME="${GITHUB_REF#refs/heads/}" + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + VERSION="${{ inputs.tag }}" + elif [ "${{ github.event_name }}" = "release" ]; then + VERSION="${{ github.event.release.tag_name }}" else - REF_NAME="unknown" + VERSION="${{ github.ref_name }}" fi - echo "TAG=$REF_NAME" >> $GITHUB_ENV - + VERSION="${VERSION#v}" + echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Download linux-zip artifact uses: actions/download-artifact@v4 with: @@ -218,13 +230,13 @@ jobs: tar -xzf linux-zip/yt-playlist-linux-*.tar.gz -C . - name: Build Docker image with release tag - run: docker build ./ -t ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} + run: docker build ./ -t ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} - - name: Save Docker image ${TAG} as tar + - name: Save Docker image as tar run: | - docker save -o docker-image.tar ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} + docker save -o docker-image.tar ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} - - name: Upload docker-image-${TAG} artifact + - name: Upload docker-image artifact uses: actions/upload-artifact@v4 with: name: docker-image @@ -254,16 +266,19 @@ jobs: - name: Download all artifacts uses: actions/download-artifact@v4 - - name: Extract ref name + - name: Get version from tag + id: version + shell: bash run: | - if [[ "$GITHUB_REF" == refs/tags/* ]]; then - REF_NAME="${GITHUB_REF#refs/tags/}" - elif [[ "$GITHUB_REF" == refs/heads/* ]]; then - REF_NAME="${GITHUB_REF#refs/heads/}" + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + VERSION="${{ inputs.tag }}" + elif [ "${{ github.event_name }}" = "release" ]; then + VERSION="${{ github.event.release.tag_name }}" else - REF_NAME="unknown" + VERSION="${{ github.ref_name }}" fi - echo "TAG=$REF_NAME" >> $GITHUB_ENV + VERSION="${VERSION#v}" + echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Login to the Container registry uses: docker/login-action@v3 @@ -278,7 +293,7 @@ jobs: docker load -i docker-image/docker-image.tar - name: Push Docker image with release tag - run: docker push ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} + run: docker push ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} - name: Load docker image from tar run: | @@ -294,24 +309,24 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ env.TAG }} - release_name: ${{ env.TAG }} + tag_name: ${{ steps.version.outputs.version }} + release_name: ${{ steps.version.outputs.version }} draft: true - name: Upload Windows release asset uses: actions/upload-release-asset@v2 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: windows-zip/yt-playlist-windows-${{ env.TAG }}.zip - asset_name: yt-playlist-windows-${{ env.TAG }}.zip + asset_path: windows-zip/yt-playlist-windows-${{ steps.version.outputs.version }}.zip + asset_name: yt-playlist-windows-${{ steps.version.outputs.version }}.zip asset_content_type: application/zip - name: Upload Linux release asset uses: actions/upload-release-asset@v2 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: linux-zip/yt-playlist-linux-${{ env.TAG }}.tar.gz - asset_name: yt-playlist-linux-${{ env.TAG }}.tar.gz + asset_path: linux-zip/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz + asset_name: yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz asset_content_type: application/gzip - name: Upload Docker image (release tag) @@ -319,7 +334,7 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: docker-image/docker-image.tar - asset_name: docker-image-${{ env.TAG }}.tar + asset_name: docker-image-${{ steps.version.outputs.version }}.tar asset_content_type: application/x-tar - name: Upload Docker image (latest) From 3958054f23aeadcf76585c6c1f95ed6f7f1e2baa Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 19:20:28 +0200 Subject: [PATCH 17/38] Update artifact paths and registry URL in release workflow --- .github/workflows/release.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 221c3bd..5e1c83a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -193,13 +193,12 @@ jobs: uses: actions/upload-artifact@v4 with: name: linux-zip - path: ${{ github.workspace }}/yt-playlist-linux-*.tar.gz + path: ${{ github.workspace }}/dist/linux/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz build-docker-image: runs-on: ubuntu-latest needs: [build-linux-package] env: - REGISTRY_URL: ghcr.io IMAGE_NAME: youtubeplaylistdownloader steps: - name: Checkout code @@ -227,14 +226,14 @@ jobs: - name: Extract linux artifact run: | set -e - tar -xzf linux-zip/yt-playlist-linux-*.tar.gz -C . + tar -xzf linux-zip/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz -C . - name: Build Docker image with release tag - run: docker build ./ -t ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} + run: docker build ./ -t ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} - name: Save Docker image as tar run: | - docker save -o docker-image.tar ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} + docker save -o docker-image.tar ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} - name: Upload docker-image artifact uses: actions/upload-artifact@v4 @@ -243,11 +242,11 @@ jobs: path: docker-image.tar - name: Build Docker image as latest (distinct digest) - run: docker build ./ --label build_as_latest=true -t ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:latest + run: docker build ./ --label build_as_latest=true -t ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }}:latest - name: Save Docker image as tar run: | - docker save -o docker-image-latest.tar ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:latest + docker save -o docker-image-latest.tar ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }}:latest - name: Upload docker-image-latest artifact uses: actions/upload-artifact@v4 @@ -260,7 +259,7 @@ jobs: runs-on: ubuntu-latest needs: [build-windows-package, build-linux-package, build-docker-image] env: - REGISTRY_URL: ghcr.io + IMAGE_NAME: youtubeplaylistdownloader steps: - name: Download all artifacts @@ -283,7 +282,7 @@ jobs: - name: Login to the Container registry uses: docker/login-action@v3 with: - registry: ${{ env.REGISTRY_URL }} + registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -293,7 +292,7 @@ jobs: docker load -i docker-image/docker-image.tar - name: Push Docker image with release tag - run: docker push ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} + run: docker push ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} - name: Load docker image from tar run: | @@ -301,7 +300,7 @@ jobs: docker load -i docker-image-latest/docker-image-latest.tar - name: Push Docker image as latest - run: docker push ${{ env.REGISTRY_URL }}/${{ github.actor }}/${{ env.IMAGE_NAME }}:latest + run: docker push ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }}:latest - name: Create GitHub Release id: create_release From 4fc1f8999e820060f720bcbd0cf194555afe8cce Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 19:21:18 +0200 Subject: [PATCH 18/38] AI: Refactor release workflow: streamline steps, remove unused sections, and enhance artifact handling --- .github/workflows/release.yml | 186 ++++++---------------------------- 1 file changed, 29 insertions(+), 157 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e1c83a..86a3786 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,6 @@ name: Build Release Packages on: - #push: - #tags: - #- "v*.*.*" workflow_dispatch: inputs: tag: @@ -15,13 +12,10 @@ jobs: build-windows-package: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v5 + - uses: actions/checkout@v5 - name: Install dependencies - run: | - sudo apt update - sudo apt install -y unzip zip curl + run: sudo apt update && sudo apt install -y unzip zip curl - name: Get version from tag id: version @@ -41,34 +35,28 @@ jobs: run: | set -e VERSION="${{ steps.version.outputs.version }}" - mkdir -p "$GITHUB_WORKSPACE/dist/windows" + mkdir -p "$GITHUB_WORKSPACE/dist/windows/bin" cp "$GITHUB_WORKSPACE/yt-playlist-main.py" "$GITHUB_WORKSPACE/dist/windows/" - mkdir -p "$GITHUB_WORKSPACE/dist/windows/bin" - # yt-dlp - curl -fL \ - -H "User-Agent: github-actions" \ + curl -fL -H "User-Agent: github-actions" \ -o "$GITHUB_WORKSPACE/dist/windows/bin/yt-dlp.exe" \ https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe # FFmpeg Windows static - curl -fL \ - -H "User-Agent: github-actions" \ + curl -fL -H "User-Agent: github-actions" \ -o "$GITHUB_WORKSPACE/dist/windows/ffmpeg.zip" \ https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip unzip -q "$GITHUB_WORKSPACE/dist/windows/ffmpeg.zip" -d "$GITHUB_WORKSPACE/dist/windows/ffmpeg_temp" mv $(find "$GITHUB_WORKSPACE/dist/windows/ffmpeg_temp" -name ffmpeg.exe | head -n 1) "$GITHUB_WORKSPACE/dist/windows/bin/ffmpeg.exe" # aria2c Windows static - curl -fL \ - -H "User-Agent: github-actions" \ + curl -fL -H "User-Agent: github-actions" \ -o "$GITHUB_WORKSPACE/dist/windows/aria2c.zip" \ https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip unzip "$GITHUB_WORKSPACE/dist/windows/aria2c.zip" -d "$GITHUB_WORKSPACE/dist/windows/" mv "$GITHUB_WORKSPACE/dist/windows/aria2-1.37.0-win-64bit-build1/aria2c.exe" "$GITHUB_WORKSPACE/dist/windows/bin/aria2c.exe" - # Remove temp files before zipping rm -rf "$GITHUB_WORKSPACE/dist/windows/ffmpeg_temp" "$GITHUB_WORKSPACE/dist/windows/aria2-1.37.0-win-64bit-build1" "$GITHUB_WORKSPACE/dist/windows/ffmpeg.zip" "$GITHUB_WORKSPACE/dist/windows/aria2c.zip" # Create windows archive @@ -83,19 +71,10 @@ jobs: name: windows-zip path: ${{ github.workspace }}/yt-playlist-windows-*.zip - - - - - - - - build-linux-package: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v5 + - uses: actions/checkout@v5 - name: Get version from tag id: version @@ -114,30 +93,24 @@ jobs: - name: Install dependencies run: | sudo apt update - sudo apt install -y unzip zip curl wget build-essential \ - pkg-config libssl-dev zlib1g-dev - - + sudo apt install -y unzip zip curl wget build-essential pkg-config libssl-dev zlib1g-dev - name: Prepare workspace run: | set -e - mkdir -p "$GITHUB_WORKSPACE/dist/linux/bin" cp "$GITHUB_WORKSPACE/yt-playlist-main.py" "$GITHUB_WORKSPACE/dist/linux/" - name: Download yt-dlp run: | - curl -fL \ - -H "User-Agent: github-actions" \ + curl -fL -H "User-Agent: github-actions" \ -o "$GITHUB_WORKSPACE/dist/linux/bin/yt-dlp" \ https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/yt-dlp" - name: Download FFmpeg static run: | - curl -fL \ - -H "User-Agent: github-actions" \ + curl -fL -H "User-Agent: github-actions" \ -o "$GITHUB_WORKSPACE/dist/linux/ffmpeg.tar.xz" \ https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz mkdir -p "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp" @@ -145,17 +118,10 @@ jobs: mv "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp/ffmpeg" "$GITHUB_WORKSPACE/dist/linux/bin/ffmpeg" chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/ffmpeg" - - name: Cache aria2c binary - uses: actions/cache@v3 - with: - path: dist/linux/bin/aria2c - key: aria2c-latest - restore-keys: | - aria2c- - - name: Build aria2c if not cached run: | set -e + mkdir -p "$GITHUB_WORKSPACE/dist/linux/bin" if [ ! -f "$GITHUB_WORKSPACE/dist/linux/bin/aria2c" ]; then mkdir -p "$GITHUB_WORKSPACE/dist/linux/aria2c_build" cd "$GITHUB_WORKSPACE" @@ -173,21 +139,19 @@ jobs: strip src/aria2c cp src/aria2c "$GITHUB_WORKSPACE/dist/linux/bin/aria2c" chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/aria2c" - # Cleanup build folders rm -rf "$GITHUB_WORKSPACE/dist/linux/aria2c_build" "$GITHUB_WORKSPACE/aria2-1.37.0" "$GITHUB_WORKSPACE/aria2-1.37.0.tar.gz" fi - name: Cleanup FFmpeg temp - run: | - rm -rf "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp" "$GITHUB_WORKSPACE/dist/linux/ffmpeg.tar.xz" + run: rm -rf "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp" "$GITHUB_WORKSPACE/dist/linux/ffmpeg.tar.xz" - name: Archive Linux package run: | set -e VERSION="${{ steps.version.outputs.version }}" cd "$GITHUB_WORKSPACE/dist/linux" - ZIP_NAME="yt-playlist-linux-${VERSION}.tar.gz" - tar -czf "$GITHUB_WORKSPACE/$ZIP_NAME" * + TAR_NAME="yt-playlist-linux-${VERSION}.tar.gz" + tar -czf "$GITHUB_WORKSPACE/$TAR_NAME" * - name: Upload Linux artifact uses: actions/upload-artifact@v4 @@ -198,11 +162,8 @@ jobs: build-docker-image: runs-on: ubuntu-latest needs: [build-linux-package] - env: - IMAGE_NAME: youtubeplaylistdownloader steps: - - name: Checkout code - uses: actions/checkout@v5 + - uses: actions/checkout@v5 - name: Get version from tag id: version @@ -218,22 +179,24 @@ jobs: VERSION="${VERSION#v}" echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Set docker image names + run: | + echo "RELEASE_IMAGE=ghcr.io/${GITHUB_ACTOR}/youtubeplaylistdownloader:${{ steps.version.outputs.version }}" >> $GITHUB_ENV + echo "LATEST_IMAGE=ghcr.io/${GITHUB_ACTOR}/youtubeplaylistdownloader:latest" >> $GITHUB_ENV + - name: Download linux-zip artifact uses: actions/download-artifact@v4 with: name: linux-zip - name: Extract linux artifact - run: | - set -e - tar -xzf linux-zip/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz -C . + run: tar -xzf linux-zip/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz -C . - - name: Build Docker image with release tag - run: docker build ./ -t ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} + - name: Build Docker image (release) + run: docker build ./ -t $RELEASE_IMAGE - name: Save Docker image as tar - run: | - docker save -o docker-image.tar ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} + run: docker save -o docker-image.tar $RELEASE_IMAGE - name: Upload docker-image artifact uses: actions/upload-artifact@v4 @@ -241,105 +204,14 @@ jobs: name: docker-image path: docker-image.tar - - name: Build Docker image as latest (distinct digest) - run: docker build ./ --label build_as_latest=true -t ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }}:latest + - name: Build Docker image (latest) + run: docker build ./ --label build_as_latest=true -t $LATEST_IMAGE - - name: Save Docker image as tar - run: | - docker save -o docker-image-latest.tar ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }}:latest + - name: Save Docker image as tar (latest) + run: docker save -o docker-image-latest.tar $LATEST_IMAGE - name: Upload docker-image-latest artifact uses: actions/upload-artifact@v4 with: name: docker-image-latest - path: docker-image-latest.tar - - - release: - runs-on: ubuntu-latest - needs: [build-windows-package, build-linux-package, build-docker-image] - env: - - IMAGE_NAME: youtubeplaylistdownloader - steps: - - name: Download all artifacts - uses: actions/download-artifact@v4 - - - name: Get version from tag - id: version - shell: bash - run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - VERSION="${{ inputs.tag }}" - elif [ "${{ github.event_name }}" = "release" ]; then - VERSION="${{ github.event.release.tag_name }}" - else - VERSION="${{ github.ref_name }}" - fi - VERSION="${VERSION#v}" - echo "version=$VERSION" >> $GITHUB_OUTPUT - - - name: Login to the Container registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Load docker image from tar - run: | - set -e - docker load -i docker-image/docker-image.tar - - - name: Push Docker image with release tag - run: docker push ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }} - - - name: Load docker image from tar - run: | - set -e - docker load -i docker-image-latest/docker-image-latest.tar - - - name: Push Docker image as latest - run: docker push ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }}:latest - - - name: Create GitHub Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.version.outputs.version }} - release_name: ${{ steps.version.outputs.version }} - draft: true - - - name: Upload Windows release asset - uses: actions/upload-release-asset@v2 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: windows-zip/yt-playlist-windows-${{ steps.version.outputs.version }}.zip - asset_name: yt-playlist-windows-${{ steps.version.outputs.version }}.zip - asset_content_type: application/zip - - - name: Upload Linux release asset - uses: actions/upload-release-asset@v2 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: linux-zip/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz - asset_name: yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz - asset_content_type: application/gzip - - - name: Upload Docker image (release tag) - uses: actions/upload-release-asset@v2 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: docker-image/docker-image.tar - asset_name: docker-image-${{ steps.version.outputs.version }}.tar - asset_content_type: application/x-tar - - - name: Upload Docker image (latest) - uses: actions/upload-release-asset@v2 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: docker-image-latest/docker-image-latest.tar - asset_name: docker-image-latest.tar - asset_content_type: application/x-tar \ No newline at end of file + path: docker-image-latest.tar \ No newline at end of file From 585875c4478e1d91d56dcf72a36a91aa9ebec903 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 19:25:54 +0200 Subject: [PATCH 19/38] AI: readd release job --- .github/workflows/release.yml | 89 ++++++++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86a3786..3cc3557 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -214,4 +214,91 @@ jobs: uses: actions/upload-artifact@v4 with: name: docker-image-latest - path: docker-image-latest.tar \ No newline at end of file + path: docker-image-latest.tar + + release: + runs-on: ubuntu-latest + needs: [build-windows-package, build-linux-package, build-docker-image] + env: + IMAGE_NAME: youtubeplaylistdownloader + steps: + - uses: actions/download-artifact@v4 + with: + name: windows-zip + - uses: actions/download-artifact@v4 + with: + name: linux-zip + - uses: actions/download-artifact@v4 + with: + name: docker-image + - uses: actions/download-artifact@v4 + with: + name: docker-image-latest + - name: Get version from tag + id: version + shell: bash + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + VERSION="${{ inputs.tag }}" + elif [ "${{ github.event_name }}" = "release" ]; then + VERSION="${{ github.event.release.tag_name }}" + else + VERSION="${{ github.ref_name }}" + fi + VERSION="${VERSION#v}" + echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Set docker image names + run: | + echo "RELEASE_IMAGE=ghcr.io/${GITHUB_ACTOR}/youtubeplaylistdownloader:${{ steps.version.outputs.version }}" >> $GITHUB_ENV + echo "LATEST_IMAGE=ghcr.io/${GITHUB_ACTOR}/youtubeplaylistdownloader:latest" >> $GITHUB_ENV + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Load and push Docker release image + run: | + docker load -i docker-image/docker-image.tar + docker push $RELEASE_IMAGE + - name: Load and push Docker latest image + run: | + docker load -i docker-image-latest/docker-image-latest.tar + docker push $LATEST_IMAGE + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.version.outputs.version }} + release_name: ${{ steps.version.outputs.version }} + draft: true + - name: Upload Windows release asset + uses: actions/upload-release-asset@v2 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: windows-zip/yt-playlist-windows-${{ steps.version.outputs.version }}.zip + asset_name: yt-playlist-windows-${{ steps.version.outputs.version }}.zip + asset_content_type: application/zip + - name: Upload Linux release asset + uses: actions/upload-release-asset@v2 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: linux-zip/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz + asset_name: yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz + asset_content_type: application/gzip + - name: Upload Docker release tar + uses: actions/upload-release-asset@v2 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: docker-image/docker-image.tar + asset_name: docker-image-${{ steps.version.outputs.version }}.tar + asset_content_type: application/x-tar + - name: Upload Docker latest tar + uses: actions/upload-release-asset@v2 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: docker-image-latest/docker-image-latest.tar + asset_name: docker-image-latest.tar + asset_content_type: application/x-tar \ No newline at end of file From caea1a72f323bfba123117414255bdbbe6bb0a0a Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 19:27:37 +0200 Subject: [PATCH 20/38] Fix artifact path for Linux package upload in release workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3cc3557..e4232b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -157,7 +157,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: linux-zip - path: ${{ github.workspace }}/dist/linux/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz + path: ${{ github.workspace }}/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz build-docker-image: runs-on: ubuntu-latest From 9b3cac4d00e898813dfd00d60da9f3cea436793d Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 19:37:40 +0200 Subject: [PATCH 21/38] AI: fix extracted Linux artifacts --- .github/workflows/release.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e4232b4..6516e98 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -184,16 +184,18 @@ jobs: echo "RELEASE_IMAGE=ghcr.io/${GITHUB_ACTOR}/youtubeplaylistdownloader:${{ steps.version.outputs.version }}" >> $GITHUB_ENV echo "LATEST_IMAGE=ghcr.io/${GITHUB_ACTOR}/youtubeplaylistdownloader:latest" >> $GITHUB_ENV - - name: Download linux-zip artifact + - name: Download linux artifact uses: actions/download-artifact@v4 with: name: linux-zip - name: Extract linux artifact - run: tar -xzf linux-zip/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz -C . + run: | + mkdir -p dist/linux + tar -xzf linux-zip/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz -C dist/linux - name: Build Docker image (release) - run: docker build ./ -t $RELEASE_IMAGE + run: docker build dist/linux -t $RELEASE_IMAGE - name: Save Docker image as tar run: docker save -o docker-image.tar $RELEASE_IMAGE @@ -205,7 +207,7 @@ jobs: path: docker-image.tar - name: Build Docker image (latest) - run: docker build ./ --label build_as_latest=true -t $LATEST_IMAGE + run: docker build dist/linux --label build_as_latest=true -t $LATEST_IMAGE - name: Save Docker image as tar (latest) run: docker save -o docker-image-latest.tar $LATEST_IMAGE From 3081a384c50ad83deb1e680acb386f9e14ab6e90 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 19:44:16 +0200 Subject: [PATCH 22/38] Add debug steps for Linux artifact extraction and contents verification --- .github/workflows/release.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6516e98..01b6852 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -189,10 +189,31 @@ jobs: with: name: linux-zip + - name: Debug artifact contents + run: | + echo "Current directory: $(pwd)" + echo "Listing top-level files:" + ls -lh + echo "Listing linux-zip directory contents:" + ls -lh linux-zip || echo "linux-zip does not exist" + echo "Tree of linux-zip (if installed):" + if command -v tree &> /dev/null; then + tree linux-zip || echo "linux-zip tree failed" + fi + - name: Extract linux artifact run: | mkdir -p dist/linux - tar -xzf linux-zip/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz -C dist/linux + tar -xzf linux-zip/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz -C dist/linux || \ + (echo "Extraction failed"; ls -lh linux-zip; exit 1) + + - name: Debug dist/linux + run: | + echo "Listing dist/linux after extraction:" + ls -lh dist/linux + if command -v tree &> /dev/null; then + tree dist/linux + fi - name: Build Docker image (release) run: docker build dist/linux -t $RELEASE_IMAGE From d61e4c33c90bc3c22ad08314f2d128cfbb4ae822 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 19:52:43 +0200 Subject: [PATCH 23/38] fix job and Remove debug steps for Docker image build --- .github/workflows/release.yml | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 01b6852..e6f1c76 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -189,31 +189,10 @@ jobs: with: name: linux-zip - - name: Debug artifact contents - run: | - echo "Current directory: $(pwd)" - echo "Listing top-level files:" - ls -lh - echo "Listing linux-zip directory contents:" - ls -lh linux-zip || echo "linux-zip does not exist" - echo "Tree of linux-zip (if installed):" - if command -v tree &> /dev/null; then - tree linux-zip || echo "linux-zip tree failed" - fi - - name: Extract linux artifact run: | mkdir -p dist/linux - tar -xzf linux-zip/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz -C dist/linux || \ - (echo "Extraction failed"; ls -lh linux-zip; exit 1) - - - name: Debug dist/linux - run: | - echo "Listing dist/linux after extraction:" - ls -lh dist/linux - if command -v tree &> /dev/null; then - tree dist/linux - fi + tar -xzf yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz -C dist/linux - name: Build Docker image (release) run: docker build dist/linux -t $RELEASE_IMAGE From 48233b4cc37ea81f64c1f92fe5edf8f8746fb01e Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 19:59:43 +0200 Subject: [PATCH 24/38] fix caching for aria2c binary and display cache status --- .github/workflows/release.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6f1c76..4980a0a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -141,6 +141,21 @@ jobs: chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/aria2c" rm -rf "$GITHUB_WORKSPACE/dist/linux/aria2c_build" "$GITHUB_WORKSPACE/aria2-1.37.0" "$GITHUB_WORKSPACE/aria2-1.37.0.tar.gz" fi + - name: Cache aria2c binary + id: aria2-cache + uses: actions/cache@v3 + with: + path: | + dist/linux/bin + key: aria2c-${{ runner.os }}-v1 + restore-keys: | + aria2c-${{ runner.os }}- + + - name: Show cache status and bin contents + run: | + echo "Cache hit: ${{ steps.aria2-cache.outputs.cache-hit }}" + echo "Listing dist/linux/bin:" + ls -la dist/linux/bin || true - name: Cleanup FFmpeg temp run: rm -rf "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp" "$GITHUB_WORKSPACE/dist/linux/ffmpeg.tar.xz" From a44fd5bc905755b3d2d30af3a44c9e58623f14da Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 20:05:27 +0200 Subject: [PATCH 25/38] Refactor Docker build context for Linux artifacts and update image build steps --- .github/workflows/release.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4980a0a..bf443db 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -204,15 +204,19 @@ jobs: with: name: linux-zip - - name: Extract linux artifact + - name: Prepare Docker build context run: | - mkdir -p dist/linux - tar -xzf yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz -C dist/linux + mkdir -p dist/linux-docker + cp Dockerfile dist/linux-docker/ + echo "Copying and extracting Linux artifact..." + tar -xzf yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz -C dist/linux-docker/ + echo "Build context contents:" + ls -R dist/linux-docker - name: Build Docker image (release) - run: docker build dist/linux -t $RELEASE_IMAGE + run: docker build dist/linux-docker -t $RELEASE_IMAGE - - name: Save Docker image as tar + - name: Save Docker image as tar (release) run: docker save -o docker-image.tar $RELEASE_IMAGE - name: Upload docker-image artifact @@ -222,7 +226,7 @@ jobs: path: docker-image.tar - name: Build Docker image (latest) - run: docker build dist/linux --label build_as_latest=true -t $LATEST_IMAGE + run: docker build dist/linux-docker --label build_as_latest=true -t $LATEST_IMAGE - name: Save Docker image as tar (latest) run: docker save -o docker-image-latest.tar $LATEST_IMAGE From 4a9b6b5850d19883432d5196694134c5a0f51b73 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 20:13:23 +0200 Subject: [PATCH 26/38] change upload-release-asset action to v1 --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf443db..64aeced 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -296,28 +296,28 @@ jobs: release_name: ${{ steps.version.outputs.version }} draft: true - name: Upload Windows release asset - uses: actions/upload-release-asset@v2 + uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: windows-zip/yt-playlist-windows-${{ steps.version.outputs.version }}.zip asset_name: yt-playlist-windows-${{ steps.version.outputs.version }}.zip asset_content_type: application/zip - name: Upload Linux release asset - uses: actions/upload-release-asset@v2 + uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: linux-zip/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz asset_name: yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz asset_content_type: application/gzip - name: Upload Docker release tar - uses: actions/upload-release-asset@v2 + uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: docker-image/docker-image.tar asset_name: docker-image-${{ steps.version.outputs.version }}.tar asset_content_type: application/x-tar - name: Upload Docker latest tar - uses: actions/upload-release-asset@v2 + uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: docker-image-latest/docker-image-latest.tar From 5d55cb8ee4ff3e5ee89de39dbf5bd82dbb4e9dfa Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 20:37:01 +0200 Subject: [PATCH 27/38] Add retries to curl commands for downloading dependencies in release workflow --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 64aeced..a893cf6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,19 +39,19 @@ jobs: cp "$GITHUB_WORKSPACE/yt-playlist-main.py" "$GITHUB_WORKSPACE/dist/windows/" # yt-dlp - curl -fL -H "User-Agent: github-actions" \ + curl -fL --retry 3 -H "User-Agent: github-actions" \ -o "$GITHUB_WORKSPACE/dist/windows/bin/yt-dlp.exe" \ https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe # FFmpeg Windows static - curl -fL -H "User-Agent: github-actions" \ + curl -fL --retry 3 -H "User-Agent: github-actions" \ -o "$GITHUB_WORKSPACE/dist/windows/ffmpeg.zip" \ https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip unzip -q "$GITHUB_WORKSPACE/dist/windows/ffmpeg.zip" -d "$GITHUB_WORKSPACE/dist/windows/ffmpeg_temp" mv $(find "$GITHUB_WORKSPACE/dist/windows/ffmpeg_temp" -name ffmpeg.exe | head -n 1) "$GITHUB_WORKSPACE/dist/windows/bin/ffmpeg.exe" # aria2c Windows static - curl -fL -H "User-Agent: github-actions" \ + curl -fL --retry 3 -H "User-Agent: github-actions" \ -o "$GITHUB_WORKSPACE/dist/windows/aria2c.zip" \ https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip unzip "$GITHUB_WORKSPACE/dist/windows/aria2c.zip" -d "$GITHUB_WORKSPACE/dist/windows/" @@ -103,14 +103,14 @@ jobs: - name: Download yt-dlp run: | - curl -fL -H "User-Agent: github-actions" \ + curl -fL --retry 3 -H "User-Agent: github-actions" \ -o "$GITHUB_WORKSPACE/dist/linux/bin/yt-dlp" \ https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/yt-dlp" - name: Download FFmpeg static run: | - curl -fL -H "User-Agent: github-actions" \ + curl -fL --retry 3 -H "User-Agent: github-actions" \ -o "$GITHUB_WORKSPACE/dist/linux/ffmpeg.tar.xz" \ https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz mkdir -p "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp" From a43b6a1bffd960d49673f2637c921fc5c594bffc Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 20:50:09 +0200 Subject: [PATCH 28/38] fix aria2c cache in release workflow --- .github/workflows/release.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a893cf6..277400d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -117,7 +117,14 @@ jobs: tar -xf "$GITHUB_WORKSPACE/dist/linux/ffmpeg.tar.xz" -C "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp" --strip-components=1 mv "$GITHUB_WORKSPACE/dist/linux/ffmpeg_temp/ffmpeg" "$GITHUB_WORKSPACE/dist/linux/bin/ffmpeg" chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/ffmpeg" - + + - name: Restore aria2 cache + id: aria2-cache + uses: actions/cache@v3 + with: + path: dist/linux/bin/aria2c + key: aria2c-${{ runner.os }}-1.37.0 + - name: Build aria2c if not cached run: | set -e @@ -141,15 +148,6 @@ jobs: chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/aria2c" rm -rf "$GITHUB_WORKSPACE/dist/linux/aria2c_build" "$GITHUB_WORKSPACE/aria2-1.37.0" "$GITHUB_WORKSPACE/aria2-1.37.0.tar.gz" fi - - name: Cache aria2c binary - id: aria2-cache - uses: actions/cache@v3 - with: - path: | - dist/linux/bin - key: aria2c-${{ runner.os }}-v1 - restore-keys: | - aria2c-${{ runner.os }}- - name: Show cache status and bin contents run: | From 07fb74d7e481b0e5f1cad4a725a8f2dbe091675a Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 20:51:29 +0200 Subject: [PATCH 29/38] Optimize aria2c build step to skip if cached --- .github/workflows/release.yml | 39 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 277400d..eee8582 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -126,28 +126,29 @@ jobs: key: aria2c-${{ runner.os }}-1.37.0 - name: Build aria2c if not cached + if: steps.aria2-cache.outputs.cache-hit != 'true' run: | set -e mkdir -p "$GITHUB_WORKSPACE/dist/linux/bin" - if [ ! -f "$GITHUB_WORKSPACE/dist/linux/bin/aria2c" ]; then - mkdir -p "$GITHUB_WORKSPACE/dist/linux/aria2c_build" - cd "$GITHUB_WORKSPACE" - wget https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0.tar.gz - tar -xzf aria2-1.37.0.tar.gz - cd aria2-1.37.0 - CFLAGS="-Os -s" LDFLAGS="-static" ./configure \ - --enable-static --disable-shared \ - --disable-libaria2 --without-ca-bundle \ - --without-libnettle --without-libgcrypt \ - --without-libssh2 --without-libexpat \ - --without-libxml2 --without-libsqlite3 \ - --with-openssl - make -j"$(nproc)" - strip src/aria2c - cp src/aria2c "$GITHUB_WORKSPACE/dist/linux/bin/aria2c" - chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/aria2c" - rm -rf "$GITHUB_WORKSPACE/dist/linux/aria2c_build" "$GITHUB_WORKSPACE/aria2-1.37.0" "$GITHUB_WORKSPACE/aria2-1.37.0.tar.gz" - fi + + mkdir -p "$GITHUB_WORKSPACE/dist/linux/aria2c_build" + cd "$GITHUB_WORKSPACE" + wget https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0.tar.gz + tar -xzf aria2-1.37.0.tar.gz + cd aria2-1.37.0 + CFLAGS="-Os -s" LDFLAGS="-static" ./configure \ + --enable-static --disable-shared \ + --disable-libaria2 --without-ca-bundle \ + --without-libnettle --without-libgcrypt \ + --without-libssh2 --without-libexpat \ + --without-libxml2 --without-libsqlite3 \ + --with-openssl + make -j"$(nproc)" + strip src/aria2c + cp src/aria2c "$GITHUB_WORKSPACE/dist/linux/bin/aria2c" + chmod +x "$GITHUB_WORKSPACE/dist/linux/bin/aria2c" + rm -rf "$GITHUB_WORKSPACE/dist/linux/aria2c_build" "$GITHUB_WORKSPACE/aria2-1.37.0" "$GITHUB_WORKSPACE/aria2-1.37.0.tar.gz" + - name: Show cache status and bin contents run: | From f8cc0a8e9dc3da1cf25a53d513888b4189ee6cc1 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 20:54:12 +0200 Subject: [PATCH 30/38] Fix artifact download paths in release workflow --- .github/workflows/release.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eee8582..be1a1b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -243,17 +243,22 @@ jobs: IMAGE_NAME: youtubeplaylistdownloader steps: - uses: actions/download-artifact@v4 - with: + with: name: windows-zip + path: windows-zip - uses: actions/download-artifact@v4 - with: + with: name: linux-zip + path: linux-zip - uses: actions/download-artifact@v4 - with: + with: name: docker-image + path: docker-image - uses: actions/download-artifact@v4 - with: + with: name: docker-image-latest + path: docker-image-latest + - name: Get version from tag id: version shell: bash From 61916e60c5eb50b22a18e9d7b9a675934e1b40d2 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 21:02:41 +0200 Subject: [PATCH 31/38] Add permissions section for workflow to enable artifact management --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index be1a1b1..4b757a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,11 @@ on: description: "Release tag (e.g., v0.1.0)" required: true type: string - + +permissions: + contents: write + packages: write + jobs: build-windows-package: runs-on: ubuntu-latest From 1aa41c739971217be5e887011cb51ca5c8a9138d Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 21:04:53 +0200 Subject: [PATCH 32/38] change artifact names in release workflow --- .github/workflows/release.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4b757a4..3f258bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ on: permissions: contents: write packages: write - + jobs: build-windows-package: runs-on: ubuntu-latest @@ -72,7 +72,7 @@ jobs: - name: Upload Windows artifact uses: actions/upload-artifact@v4 with: - name: windows-zip + name: windows-release path: ${{ github.workspace }}/yt-playlist-windows-*.zip build-linux-package: @@ -174,7 +174,7 @@ jobs: - name: Upload Linux artifact uses: actions/upload-artifact@v4 with: - name: linux-zip + name: linux-release path: ${{ github.workspace }}/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz build-docker-image: @@ -205,7 +205,7 @@ jobs: - name: Download linux artifact uses: actions/download-artifact@v4 with: - name: linux-zip + name: linux-release - name: Prepare Docker build context run: | @@ -248,12 +248,12 @@ jobs: steps: - uses: actions/download-artifact@v4 with: - name: windows-zip - path: windows-zip + name: windows-release + path: windows-release - uses: actions/download-artifact@v4 with: - name: linux-zip - path: linux-zip + name: linux-release + path: linux-release - uses: actions/download-artifact@v4 with: name: docker-image @@ -307,14 +307,14 @@ jobs: uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: windows-zip/yt-playlist-windows-${{ steps.version.outputs.version }}.zip + asset_path: windows-release/yt-playlist-windows-${{ steps.version.outputs.version }}.zip asset_name: yt-playlist-windows-${{ steps.version.outputs.version }}.zip asset_content_type: application/zip - name: Upload Linux release asset uses: actions/upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: linux-zip/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz + asset_path: linux-release/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz asset_name: yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz asset_content_type: application/gzip - name: Upload Docker release tar From ee929e55d6f4b3d67e366fb5d1f7c964fb34e10c Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 21:09:41 +0200 Subject: [PATCH 33/38] Add GITHUB_TOKEN environment variable for release asset uploads --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f258bf..ba49083 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -305,6 +305,8 @@ jobs: draft: true - name: Upload Windows release asset uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: windows-release/yt-playlist-windows-${{ steps.version.outputs.version }}.zip @@ -312,6 +314,8 @@ jobs: asset_content_type: application/zip - name: Upload Linux release asset uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: linux-release/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz @@ -319,6 +323,8 @@ jobs: asset_content_type: application/gzip - name: Upload Docker release tar uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: docker-image/docker-image.tar @@ -326,6 +332,8 @@ jobs: asset_content_type: application/x-tar - name: Upload Docker latest tar uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: docker-image-latest/docker-image-latest.tar From 5eecf5fd086f2d6c743384b1b0c04514c591dfaf Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 21:12:58 +0200 Subject: [PATCH 34/38] Update release name format in GitHub release action --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba49083..5aa32ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -294,6 +294,7 @@ jobs: run: | docker load -i docker-image-latest/docker-image-latest.tar docker push $LATEST_IMAGE + - name: Create GitHub Release id: create_release uses: actions/create-release@v1 @@ -301,7 +302,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ steps.version.outputs.version }} - release_name: ${{ steps.version.outputs.version }} + release_name: "Release${{ steps.version.outputs.version }}" draft: true - name: Upload Windows release asset uses: actions/upload-release-asset@v1 From 70e90ce9be611607601804240875044c888cdb80 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 21:18:14 +0200 Subject: [PATCH 35/38] Change Docker image name in release workflow --- .github/workflows/release.yml | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5aa32ba..67d6dae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -199,8 +199,8 @@ jobs: - name: Set docker image names run: | - echo "RELEASE_IMAGE=ghcr.io/${GITHUB_ACTOR}/youtubeplaylistdownloader:${{ steps.version.outputs.version }}" >> $GITHUB_ENV - echo "LATEST_IMAGE=ghcr.io/${GITHUB_ACTOR}/youtubeplaylistdownloader:latest" >> $GITHUB_ENV + echo "RELEASE_IMAGE=ghcr.io/${GITHUB_ACTOR}/ytpld:${{ steps.version.outputs.version }}" >> $GITHUB_ENV + echo "LATEST_IMAGE=ghcr.io/${GITHUB_ACTOR}/ytpld:latest" >> $GITHUB_ENV - name: Download linux artifact uses: actions/download-artifact@v4 @@ -243,8 +243,6 @@ jobs: release: runs-on: ubuntu-latest needs: [build-windows-package, build-linux-package, build-docker-image] - env: - IMAGE_NAME: youtubeplaylistdownloader steps: - uses: actions/download-artifact@v4 with: @@ -278,8 +276,8 @@ jobs: echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Set docker image names run: | - echo "RELEASE_IMAGE=ghcr.io/${GITHUB_ACTOR}/youtubeplaylistdownloader:${{ steps.version.outputs.version }}" >> $GITHUB_ENV - echo "LATEST_IMAGE=ghcr.io/${GITHUB_ACTOR}/youtubeplaylistdownloader:latest" >> $GITHUB_ENV + echo "RELEASE_IMAGE=ghcr.io/${GITHUB_ACTOR}/ytpld:${{ steps.version.outputs.version }}" >> $GITHUB_ENV + echo "LATEST_IMAGE=ghcr.io/${GITHUB_ACTOR}/ytpld:latest" >> $GITHUB_ENV - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: @@ -321,22 +319,4 @@ jobs: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: linux-release/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz asset_name: yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz - asset_content_type: application/gzip - - name: Upload Docker release tar - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: docker-image/docker-image.tar - asset_name: docker-image-${{ steps.version.outputs.version }}.tar - asset_content_type: application/x-tar - - name: Upload Docker latest tar - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: docker-image-latest/docker-image-latest.tar - asset_name: docker-image-latest.tar - asset_content_type: application/x-tar \ No newline at end of file + asset_content_type: application/gzip \ No newline at end of file From b91d3f4c4893eabf0fef4fccf2d2d7d143d25f0e Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 21:22:31 +0200 Subject: [PATCH 36/38] Update .gitignore and README --- .gitignore | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 666269f..319850e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ #Custom for this project yt-playlist-config.json -/bin/ +/bin /config/ # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/README.md b/README.md index 195e4df..2725769 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ You can run YouTube Playlist Downloader using the official Docker image. ### Run the container ```pwsh -docker run -v /path/to/downloads:/app/downloads -v /path/to/config:/app/config ghcr.io/dark_zoul/YoutubePlaylistDownloader:latest +docker run -v /path/to/downloads:/app/downloads -v /path/to/config:/app/config ghcr.io/dark_zoul/ytpld:latest ``` Replace `/path/to/downloads` and `/path/to/config` with your local directories. @@ -133,7 +133,7 @@ Create a `docker-compose.yml` with the following content (replace the host paths ```yaml services: yt-downloader: - image: ghcr.io/dark_zoul/YoutubePlaylistDownloader:latest + image: ghcr.io/dark_zoul/ytpld:latest container_name: yt-downloader restart: no volumes: From 1d8dab1bfb76d5d5f1aa4470fbeda08963467af4 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 21:26:54 +0200 Subject: [PATCH 37/38] Add build status badge to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2725769..c07376c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # YouTube Playlist Downloader +[![Build Release Packages](https://github.com/darkzoul5/YoutubePlaylistDownloader/actions/workflows/release.yml/badge.svg?branch=main)](https://github.com/darkzoul5/YoutubePlaylistDownloader/actions/workflows/release.yml) + A cross-platform tool for downloading entire YouTube playlists as MP3 or MP4 files, using [yt-dlp](https://github.com/yt-dlp/yt-dlp), [ffmpeg](https://ffmpeg.org/), and [aria2c](https://github.com/aria2/aria2). Includes a GitHub Actions CI/CD workflow for packaging and releasing Windows and Linux binaries. Supports audio, video, or both download modes, music and videos are numbered as they are on your youtube playlist, playlist cleanup, and configurable parallel download options. From 8c99edf3ac0409a6b15bed3cd6df64c2ce2ebeca Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 7 Mar 2026 21:35:22 +0200 Subject: [PATCH 38/38] Fix release name typo --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 67d6dae..d51663f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -300,7 +300,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ steps.version.outputs.version }} - release_name: "Release${{ steps.version.outputs.version }}" + release_name: "Release ${{ steps.version.outputs.version }}" draft: true - name: Upload Windows release asset uses: actions/upload-release-asset@v1