deps(clipper): update bundled yt-dlp to 2025.08.27 #220
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: yt_clipper | |
| on: | |
| push: | |
| branches: | |
| - release | |
| - release/* | |
| - test-ci | |
| # Workflow env variables not yet available at job level | |
| # See https://github.community/t/how-to-set-and-access-a-workflow-variable/17335/14 | |
| # Can work around to some degree using set-env | |
| env: | |
| NAME: yt_clipper | |
| VERSION: '5.34.0' | |
| jobs: | |
| build: | |
| defaults: | |
| run: | |
| shell: bash | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| max-parallel: 4 | |
| matrix: | |
| node-version: ['22.18.x'] | |
| os: [windows-latest, macos-latest] | |
| include: | |
| - os: windows-latest | |
| shortos: win | |
| ffmpeg_dl_name: ffmpeg-8.0-full_build-shared | |
| ffmpeg_dl_prefix: 'https://github.com/GyanD/codexffmpeg/releases/download/8.0' | |
| yt-dlp_download_url: 'https://github.com/yt-dlp/yt-dlp/releases/download/2025.08.27/yt-dlp.exe' | |
| - os: macos-latest | |
| shortos: macos | |
| ffmpeg_dl_url: 'https://evermeet.cx/ffmpeg/ffmpeg-8.0.7z' | |
| ffprobe_dl_url: 'https://evermeet.cx/ffmpeg/ffprobe-8.0.7z' | |
| ffplay_dl_url: 'https://evermeet.cx/ffmpeg/ffplay-8.0.7z' | |
| ffmpeg_info_url: 'https://evermeet.cx/ffmpeg/info/8.0' | |
| yt-dlp_download_url: 'https://github.com/yt-dlp/yt-dlp/releases/download/2025.08.27/yt-dlp_macos' | |
| steps: | |
| - name: Set env | |
| shell: bash | |
| run: | | |
| echo "FULL_NAME=${{env.NAME}}_${{matrix.shortos}}_${{env.VERSION}}" >> $GITHUB_ENV | |
| echo "NOPLAT_NAME=${{env.NAME}}_${{env.VERSION}}" >> $GITHUB_ENV | |
| - uses: actions/checkout@v3 | |
| with: | |
| persist-credentials: false | |
| - name: Set up dirs | |
| shell: bash | |
| run: | | |
| mkdir -p ./artifact/py/${{env.FULL_NAME}}/{webms,bin,temp}/ | |
| mkdir -p ./bindeps | |
| - name: Download ffmpeg dependency (windows) | |
| if: matrix.os == 'windows-latest' | |
| shell: bash | |
| run: | | |
| cd ./bindeps | |
| curl -o ./ffmpeg.zip -L ${{ format('{0}/{1}.7z', matrix.ffmpeg_dl_prefix, matrix.ffmpeg_dl_name) }} | |
| 7z x ./ffmpeg.zip | |
| mv ./${{matrix.ffmpeg_dl_name}} ffmpeg | |
| ./ffmpeg/bin/ffmpeg -version > version.txt | |
| mv version.txt ffmpeg | |
| ls -laR | |
| - name: Download ffmpeg dependency (macos) | |
| if: matrix.shortos == 'macos' | |
| shell: bash | |
| run: | | |
| cd ./bindeps | |
| mkdir temp | |
| cd temp | |
| curl -o ./ffmpeg.7z -L ${{matrix.ffmpeg_dl_url}} | |
| curl -o ./ffprobe.7z -L ${{matrix.ffprobe_dl_url}} | |
| curl -o ./ffplay.7z -L ${{matrix.ffplay_dl_url}} | |
| curl -o version.txt -L ${{matrix.ffmpeg_info_url}} | |
| 7z x ./ffmpeg.7z | |
| 7z x ./ffprobe.7z | |
| 7z x ./ffplay.7z | |
| cd .. | |
| mkdir -p ffmpeg/bin | |
| mv temp/ffmpeg temp/ffprobe temp/ffplay ffmpeg/bin | |
| chmod -v +x ffmpeg/bin/* | |
| mv temp/version.txt ffmpeg | |
| ls -laR | |
| - name: Download yt-dlp dependency | |
| shell: bash | |
| run: | | |
| cd ./bindeps | |
| mkdir -p yt-dlp/bin | |
| cd yt-dlp/bin | |
| curl -O -L ${{ matrix.yt-dlp_download_url }} | |
| chmod -v +x * | |
| ls -laR | |
| - name: Setup just | |
| uses: extractions/setup-just@v2 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'yarn' | |
| architecture: 'x64' | |
| - name: Load cached node_modules | |
| id: cached-node_modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: node_modules | |
| key: yarn-${{ matrix.os }}-${{ hashFiles('**/yarn.lock') }} | |
| - run: yarn install --frozen-lockfile | |
| - run: just bundle-prod | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: '0.8.0' | |
| enable-cache: true | |
| cache-dependency-glob: 'uv.lock' | |
| - name: Set up Python | |
| run: uv python install | |
| - name: Install the project | |
| run: uv sync --all-extras --dev | |
| - name: Lint with ruff | |
| run: just lint-py | |
| - name: Run clipper tests | |
| run: just test-py | |
| - name: Generate executable | |
| run: just build-py | |
| # Done with uv | |
| - name: Minimize uv cache | |
| run: uv cache prune --ci | |
| - name: Copy artifacts | |
| shell: bash | |
| run: | | |
| mv ./bindeps/ffmpeg/bin/* ./artifact/py/${{env.FULL_NAME}}/bin/ | |
| mv ./bindeps/ffmpeg/*.txt ./artifact/py/${{env.FULL_NAME}}/bin/ | |
| mv ./bindeps/yt-dlp/bin/* ./artifact/py/${{env.FULL_NAME}}/bin/ | |
| cp ./src/clipper/include/* ./artifact/py/${{env.FULL_NAME}}/ | |
| cp ./src/clipper/${{matrix.shortos}}_helpers/* ./artifact/py/${{env.FULL_NAME}}/ | |
| mkdir -p ./artifact/py/${{env.FULL_NAME}}/yt-dlp-plugins/ytc | |
| cp -R ./src/clipper/yt-dlp-plugins/ytc/ ./artifact/py/${{env.FULL_NAME}}/yt-dlp-plugins/ | |
| cp ./dist/py/yt_clipper* ./artifact/py/${{env.FULL_NAME}}/ | |
| - name: Print clipper install version (windows) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| ./dist/py/yt_clipper.exe --version | |
| - name: Print clipper install version (non-windows) | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| ./dist/py/yt_clipper --version | |
| - name: Copy artifacts (markup) | |
| if: matrix.shortos == 'macos' | |
| shell: bash | |
| run: | | |
| mkdir -p ./artifact/js/ | |
| cp ./dist/js/yt_clipper.js ./artifact/js/${{env.NOPLAT_NAME}}.js | |
| - name: Zip artifacts on windows | |
| if: matrix.os == 'windows-latest' | |
| shell: powershell | |
| run: | | |
| Compress-Archive ./artifact/py/${{env.FULL_NAME}}/ ./artifact/py/${{env.FULL_NAME}}.zip | |
| - name: Zip artifacts on non-windows systems | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| cd ./artifact/py | |
| zip -r ${{env.FULL_NAME}}.zip ./${{env.FULL_NAME}}/ | |
| - name: Upload clipper script installation artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{env.FULL_NAME}}.zip | |
| path: ./artifact/py/${{env.FULL_NAME}}.zip | |
| - name: Upload markup script installation artifact | |
| if: matrix.shortos == 'macos' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{env.NOPLAT_NAME}}.js | |
| path: ./artifact/js/${{env.NOPLAT_NAME}}.js | |
| release: | |
| needs: build | |
| runs-on: macos-13 | |
| steps: | |
| - name: Set env | |
| run: | | |
| echo "DATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV | |
| echo "FULL_NAME=${{env.NAME}}_${{env.VERSION}}" >> $GITHUB_ENV | |
| echo "FULL_NAME_WIN=${{env.NAME}}_win_${{env.VERSION}}" >> $GITHUB_ENV | |
| echo "FULL_NAME_MAC=${{env.NAME}}_macos_${{env.VERSION}}" >> $GITHUB_ENV | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{env.FULL_NAME_WIN}}.zip | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{env.FULL_NAME_MAC}}.zip | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{env.FULL_NAME}}.js | |
| - name: Create release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| with: | |
| tag_name: v${{env.VERSION}} | |
| release_name: ${{env.NAME}} v${{env.VERSION}} [${{env.DATE}}] | |
| draft: true | |
| prerelease: false | |
| - name: Upload release asset (win) | |
| id: upload-release-asset-win | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| with: | |
| upload_url: ${{steps.create_release.outputs.upload_url}} | |
| asset_path: ${{env.FULL_NAME_WIN}}.zip | |
| asset_name: ${{env.FULL_NAME_WIN}}.zip | |
| asset_content_type: application/zip | |
| - name: Upload release asset (mac) | |
| id: upload-release-asset-mac | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| with: | |
| upload_url: ${{steps.create_release.outputs.upload_url}} | |
| asset_path: ${{env.FULL_NAME_MAC}}.zip | |
| asset_name: ${{env.FULL_NAME_MAC}}.zip | |
| asset_content_type: application/zip | |
| - name: Upload release asset (markup) | |
| id: upload-release-asset-markup | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| with: | |
| upload_url: ${{steps.create_release.outputs.upload_url}} | |
| asset_path: ${{env.FULL_NAME}}.js | |
| asset_name: ${{env.FULL_NAME}}.js | |
| asset_content_type: text/javascript |