@ -12,10 +12,13 @@ on:
unix:
unix:
default : true
default : true
type : boolean
type : boolean
linux _static :
linux :
default : true
default : true
type : boolean
type : boolean
linux_arm:
linux_armv7l:
default : true
type : boolean
musllinux:
default : true
default : true
type : boolean
type : boolean
macos:
macos:
@ -52,12 +55,16 @@ on:
description : yt-dlp, yt-dlp.tar.gz
description : yt-dlp, yt-dlp.tar.gz
default : true
default : true
type : boolean
type : boolean
linux _static :
linux :
description : yt-dlp_linux
description : yt-dlp_linux , yt-dlp_linux.zip, yt-dlp_linux_aarch64, yt-dlp_linux_aarch64.zip
default : true
default : true
type : boolean
type : boolean
linux_arm:
linux_armv7l:
description : yt-dlp_linux_aarch64, yt-dlp_linux_armv7l
description : yt-dlp_linux_armv7l.zip
default : true
type : boolean
musllinux:
description : yt-dlp_musllinux, yt-dlp_musllinux.zip, yt-dlp_musllinux_aarch64, yt-dlp_musllinux_aarch64.zip
default : true
default : true
type : boolean
type : boolean
macos:
macos:
@ -134,99 +141,187 @@ jobs:
yt-dlp.tar.gz
yt-dlp.tar.gz
compression-level : 0
compression-level : 0
linux _static :
linux :
needs : process
needs : process
if : inputs.linux_static
if : inputs.linux
runs-on : ubuntu-latest
runs-on : ${{ matrix.runner }}
strategy:
fail-fast : false
matrix:
include:
- exe : yt-dlp_linux
platform : x86_64
runner : ubuntu-24.04
- exe : yt-dlp_linux_aarch64
platform : aarch64
runner : ubuntu-24.04-arm
steps:
steps:
- uses : actions/checkout@v4
- uses : actions/checkout@v4
- name : Build static executable
- name : Build executable
env:
env:
channel : ${{ inputs.channel }}
EXE_NAME : ${{ matrix.exe }}
origin : ${{ needs.process.outputs.origin }}
CHANNEL : ${{ inputs.channel }}
version : ${{ inputs.version }}
ORIGIN : ${{ needs.process.outputs.origin }}
VERSION : ${{ inputs.version }}
SERVICE : linux_${{ matrix.platform }}
run : |
run : |
mkdir ~/build
mkdir -p ~/build
cd bundle/docker
cd bundle/docker
docker compose up --build static
docker compose up --build --exit-code-from "${SERVICE}" "${SERVICE}"
sudo chown "${USER}:docker" ~/build/yt-dlp_linux
docker compose down
sudo chown "${USER}:docker" ~/build/${{ matrix.exe }}
- name : Verify executable in container
if : vars.UPDATE_TO_VERIFICATION
env:
EXE_NAME : ${{ matrix.exe }}
CHANNEL : ${{ inputs.channel }}
ORIGIN : ${{ needs.process.outputs.origin }}
VERSION : ${{ inputs.version }}
SERVICE : linux_${{ matrix.platform }}_verify
run : |
cd bundle/docker
docker compose up --build --exit-code-from "${SERVICE}" "${SERVICE}"
docker compose down
- name : Verify --update-to
- name : Verify --update-to
if : vars.UPDATE_TO_VERIFICATION
if : vars.UPDATE_TO_VERIFICATION
run : |
run : |
chmod +x ~/build/yt-dlp_linux
chmod +x ~/build/${{ matrix.exe }}
cp ~/build/yt-dlp_linux ~/build/yt-dlp_linux_downgraded
mkdir -p ~/testing
version="$(~/build/yt-dlp_linux --version)"
cp ~/build/${{ matrix.exe }} ~/testing/${{ matrix.exe }}_downgraded
~/build/yt-dlp_linux_downgraded -v --update-to yt-dlp/yt-dlp@2023.03.04
version="$(~/build/${{ matrix.exe }} --version)"
downgraded_version="$(~/build/yt-dlp_linux_downgraded --version)"
~/testing/${{ matrix.exe }}_downgraded -v --update-to yt-dlp/yt-dlp@2023.03.04
downgraded_version="$(~/testing/${{ matrix.exe }}_downgraded --version)"
[ [ "$version" != "$downgraded_version" ]]
[ [ "$version" != "$downgraded_version" ]]
- name : Upload artifacts
- name : Upload artifacts
uses : actions/upload-artifact@v4
uses : actions/upload-artifact@v4
with:
with:
name : build-bin-${{ github.job }}
name : build-bin-${{ github.job }} _${{ matrix.platform }}
path : |
path : |
~/build/ yt-dlp_linux
~/build/ ${{ matrix.exe }}*
compression-level : 0
compression-level : 0
linux_arm :
linux_arm v7l :
needs : process
needs : process
if : inputs.linux_arm
if : inputs.linux_arm v7l
permissions:
permissions:
contents : read
contents : read
packages : write # for creating cache
actions : write # For cleaning up cache
runs-on : ubuntu-latest
runs-on : ubuntu-24.04-arm
strategy:
matrix:
architecture:
- armv7
- aarch64
steps:
steps:
- uses : actions/checkout@v4
- uses : actions/checkout@v4
- name : Restore cached requirements
id : restore-cache
uses : actions/cache/restore@v4
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS : 1
with:
path : |
~/yt-dlp-build-venv
key : cache-reqs-${{ github.job }}
- name : Set up QEMU
uses : docker/setup-qemu-action@v3
with:
platforms : linux/arm/v7
- name : Build executable
env:
EXE_NAME : yt-dlp_linux_armv7l
CHANNEL : ${{ inputs.channel }}
ORIGIN : ${{ needs.process.outputs.origin }}
VERSION : ${{ inputs.version }}
SERVICE : linux_armv7l
run : |
mkdir -p ~/build
mkdir -p ~/yt-dlp-build-venv
cd bundle/docker
docker compose up --build --exit-code-from "${SERVICE}" "${SERVICE}"
docker compose down
- name : Verify executable in container
if : vars.UPDATE_TO_VERIFICATION
env:
EXE_NAME : yt-dlp_linux_armv7l
CHANNEL : ${{ inputs.channel }}
ORIGIN : ${{ needs.process.outputs.origin }}
VERSION : ${{ inputs.version }}
SERVICE : linux_armv7l_verify
run : |
cd bundle/docker
docker compose up --build --exit-code-from "${SERVICE}" "${SERVICE}"
docker compose down
- name : Upload artifacts
uses : actions/upload-artifact@v4
with:
with:
path : ./repo
name : build-bin-${{ github.job }}
- name : Virtualized Install, Prepare & Build
path : |
uses : yt-dlp/run-on-arch-action@v3
~/build/yt-dlp_linux_armv7l.zip
compression-level : 0
- name : Cleanup cache
if : steps.restore-cache.outputs.cache-hit == 'true'
env:
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
cache_key : cache-reqs-${{ github.job }}
run : |
gh cache delete "${cache_key}"
- name : Cache requirements
uses : actions/cache/save@v4
with:
with:
# Ref: https://github.com/uraimo/run-on-arch-action/issues/55
path : |
env : |
~/yt-dlp-build-venv
GITHUB_WORKFLOW : build
key : cache-reqs-${{ github.job }}
githubToken : ${{ github.token }} # To cache image
arch : ${{ matrix.architecture }}
distro : ubuntu20.04 # Standalone executable should be built on minimum supported OS
dockerRunArgs : --volume "${PWD}/repo:/repo"
install : | # Installing Python 3.10 from the Deadsnakes repo raises errors
apt update
apt -y install zlib1g-dev libffi-dev python3.9 python3.9-dev python3.9-distutils python3-pip \
python3-secretstorage # Cannot build cryptography wheel in virtual armv7 environment
python3.9 -m pip install -U pip wheel 'setuptools>=71.0.2'
# XXX: Keep this in sync with pyproject.toml (it can't be accessed at this stage) and exclude secretstorage
python3.9 -m pip install -U Pyinstaller mutagen pycryptodomex brotli certifi cffi \
'requests>=2.32.2,<3' 'urllib3>=2.0.2,<3' 'websockets>=13.0'
run : |
cd repo
python3.9 devscripts/install_deps.py -o --include build
python3.9 devscripts/install_deps.py --include pyinstaller # Cached versions may be out of date
python3.9 devscripts/update-version.py -c "${{ inputs.channel }}" -r "${{ needs.process.outputs.origin }}" "${{ inputs.version }}"
python3.9 devscripts/make_lazy_extractors.py
python3.9 -m bundle.pyinstaller
if ${{ vars.UPDATE_TO_VERIFICATION && 'true' || 'false' }}; then
arch="${{ (matrix.architecture == 'armv7' && 'armv7l') || matrix.architecture }}"
chmod +x ./dist/yt-dlp_linux_${arch}
cp ./dist/yt-dlp_linux_${arch} ./dist/yt-dlp_linux_${arch}_downgraded
version="$(./dist/yt-dlp_linux_${arch} --version)"
./dist/yt-dlp_linux_${arch}_downgraded -v --update-to yt-dlp/yt-dlp@2023.03.04
downgraded_version="$(./dist/yt-dlp_linux_${arch}_downgraded --version)"
[ [ "$version" != "$downgraded_version" ]]
fi
musllinux:
needs : process
if : inputs.musllinux
runs-on : ${{ matrix.runner }}
strategy:
fail-fast : false
matrix:
include:
- exe : yt-dlp_musllinux
platform : x86_64
runner : ubuntu-24.04
- exe : yt-dlp_musllinux_aarch64
platform : aarch64
runner : ubuntu-24.04-arm
steps:
- uses : actions/checkout@v4
- name : Build executable
env:
EXE_NAME : ${{ matrix.exe }}
CHANNEL : ${{ inputs.channel }}
ORIGIN : ${{ needs.process.outputs.origin }}
VERSION : ${{ inputs.version }}
SERVICE : musllinux_${{ matrix.platform }}
run : |
mkdir -p ~/build
cd bundle/docker
docker compose up --build --exit-code-from "${SERVICE}" "${SERVICE}"
docker compose down
sudo chown "${USER}:docker" ~/build/${{ matrix.exe }}
- name : Verify executable in container
if : vars.UPDATE_TO_VERIFICATION
env:
EXE_NAME : ${{ matrix.exe }}
CHANNEL : ${{ inputs.channel }}
ORIGIN : ${{ needs.process.outputs.origin }}
VERSION : ${{ inputs.version }}
SERVICE : musllinux_${{ matrix.platform }}_verify
run : |
cd bundle/docker
docker compose up --build --exit-code-from "${SERVICE}" "${SERVICE}"
docker compose down
- name : Upload artifacts
- name : Upload artifacts
uses : actions/upload-artifact@v4
uses : actions/upload-artifact@v4
with:
with:
name : build-bin-linux_${{ matrix.architecture }}
name : build-bin- ${{ github.job }}_${{ matrix.platform }}
path : | # run-on-arch-action designates armv7l as armv7
path : |
repo/dist/yt-dlp_linux_${{ (matrix.architecture == 'armv7' && 'armv7l') || matrix.architecture }}
~/build/${{ matrix.exe }}*
compression-level : 0
compression-level : 0
macos:
macos:
@ -436,8 +531,9 @@ jobs:
needs:
needs:
- process
- process
- unix
- unix
- linux_static
- linux
- linux_arm
- linux_armv7l
- musllinux
- macos
- macos
- windows
- windows
- windows32
- windows32
@ -473,6 +569,7 @@ jobs:
lock 2024.10.22 zip Python 3\.8
lock 2024.10.22 zip Python 3\.8
lock 2024.10.22 win(?:_x86)?_exe Python 3\.[78].+ Windows-(?:7-|2008ServerR2)
lock 2024.10.22 win(?:_x86)?_exe Python 3\.[78].+ Windows-(?:7-|2008ServerR2)
lock 2025.08.11 darwin_legacy_exe .+
lock 2025.08.11 darwin_legacy_exe .+
lock 2025.09.01 linux_armv7l_exe .+
lockV2 yt-dlp/yt-dlp 2022.08.18.36 .+ Python 3\.6
lockV2 yt-dlp/yt-dlp 2022.08.18.36 .+ Python 3\.6
lockV2 yt-dlp/yt-dlp 2023.11.16 (?!win_x86_exe).+ Python 3\.7
lockV2 yt-dlp/yt-dlp 2023.11.16 (?!win_x86_exe).+ Python 3\.7
lockV2 yt-dlp/yt-dlp 2023.11.16 win_x86_exe .+ Windows-(?:Vista|2008Server)
lockV2 yt-dlp/yt-dlp 2023.11.16 win_x86_exe .+ Windows-(?:Vista|2008Server)
@ -481,6 +578,7 @@ jobs:
lockV2 yt-dlp/yt-dlp 2024.10.22 zip Python 3\.8
lockV2 yt-dlp/yt-dlp 2024.10.22 zip Python 3\.8
lockV2 yt-dlp/yt-dlp 2024.10.22 win(?:_x86)?_exe Python 3\.[78].+ Windows-(?:7-|2008ServerR2)
lockV2 yt-dlp/yt-dlp 2024.10.22 win(?:_x86)?_exe Python 3\.[78].+ Windows-(?:7-|2008ServerR2)
lockV2 yt-dlp/yt-dlp 2025.08.11 darwin_legacy_exe .+
lockV2 yt-dlp/yt-dlp 2025.08.11 darwin_legacy_exe .+
lockV2 yt-dlp/yt-dlp 2025.09.01 linux_armv7l_exe .+
lockV2 yt-dlp/yt-dlp-nightly-builds 2023.11.15.232826 (?!win_x86_exe).+ Python 3\.7
lockV2 yt-dlp/yt-dlp-nightly-builds 2023.11.15.232826 (?!win_x86_exe).+ Python 3\.7
lockV2 yt-dlp/yt-dlp-nightly-builds 2023.11.15.232826 win_x86_exe .+ Windows-(?:Vista|2008Server)
lockV2 yt-dlp/yt-dlp-nightly-builds 2023.11.15.232826 win_x86_exe .+ Windows-(?:Vista|2008Server)
lockV2 yt-dlp/yt-dlp-nightly-builds 2024.10.22.051025 py2exe .+
lockV2 yt-dlp/yt-dlp-nightly-builds 2024.10.22.051025 py2exe .+
@ -488,6 +586,7 @@ jobs:
lockV2 yt-dlp/yt-dlp-nightly-builds 2024.10.22.051025 zip Python 3\.8
lockV2 yt-dlp/yt-dlp-nightly-builds 2024.10.22.051025 zip Python 3\.8
lockV2 yt-dlp/yt-dlp-nightly-builds 2024.10.22.051025 win(?:_x86)?_exe Python 3\.[78].+ Windows-(?:7-|2008ServerR2)
lockV2 yt-dlp/yt-dlp-nightly-builds 2024.10.22.051025 win(?:_x86)?_exe Python 3\.[78].+ Windows-(?:7-|2008ServerR2)
lockV2 yt-dlp/yt-dlp-nightly-builds 2025.08.12.233030 darwin_legacy_exe .+
lockV2 yt-dlp/yt-dlp-nightly-builds 2025.08.12.233030 darwin_legacy_exe .+
lockV2 yt-dlp/yt-dlp-nightly-builds 2025.09.01.000000 linux_armv7l_exe .+
lockV2 yt-dlp/yt-dlp-master-builds 2023.11.15.232812 (?!win_x86_exe).+ Python 3\.7
lockV2 yt-dlp/yt-dlp-master-builds 2023.11.15.232812 (?!win_x86_exe).+ Python 3\.7
lockV2 yt-dlp/yt-dlp-master-builds 2023.11.15.232812 win_x86_exe .+ Windows-(?:Vista|2008Server)
lockV2 yt-dlp/yt-dlp-master-builds 2023.11.15.232812 win_x86_exe .+ Windows-(?:Vista|2008Server)
lockV2 yt-dlp/yt-dlp-master-builds 2024.10.22.045052 py2exe .+
lockV2 yt-dlp/yt-dlp-master-builds 2024.10.22.045052 py2exe .+
@ -495,6 +594,7 @@ jobs:
lockV2 yt-dlp/yt-dlp-master-builds 2024.10.22.060347 zip Python 3\.8
lockV2 yt-dlp/yt-dlp-master-builds 2024.10.22.060347 zip Python 3\.8
lockV2 yt-dlp/yt-dlp-master-builds 2024.10.22.060347 win(?:_x86)?_exe Python 3\.[78].+ Windows-(?:7-|2008ServerR2)
lockV2 yt-dlp/yt-dlp-master-builds 2024.10.22.060347 win(?:_x86)?_exe Python 3\.[78].+ Windows-(?:7-|2008ServerR2)
lockV2 yt-dlp/yt-dlp-master-builds 2025.08.12.232447 darwin_legacy_exe .+
lockV2 yt-dlp/yt-dlp-master-builds 2025.08.12.232447 darwin_legacy_exe .+
lockV2 yt-dlp/yt-dlp-master-builds 2025.09.01.000000 linux_armv7l_exe .+
EOF
EOF
- name : Sign checksum files
- name : Sign checksum files