From 60fc70676f56d8ba99867cdd11f67bf868318f3f Mon Sep 17 00:00:00 2001 From: bashonly Date: Mon, 11 Aug 2025 14:48:07 -0500 Subject: [PATCH] [build] Add `linux_dir` builds Authored by: bashonly --- .github/workflows/build.yml | 11 +++++++---- bundle/docker/compose.yml | 14 ++++++++------ bundle/docker/linux/entrypoint.sh | 8 ++++++-- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e13bc0a50..1b9d901c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ on: default: true type: boolean linux: - description: yt-dlp_linux, yt-dlp_linux_aarch64 + description: yt-dlp_linux, yt-dlp_linux.zip, yt-dlp_linux_aarch64, yt-dlp_linux_aarch64.zip default: true type: boolean macos: @@ -145,14 +145,16 @@ jobs: - uses: actions/checkout@v4 - name: Build executable env: - channel: ${{ inputs.channel }} - origin: ${{ needs.process.outputs.origin }} - version: ${{ inputs.version }} + EXE_NAME: ${{ matrix.exe }} + CHANNEL: ${{ inputs.channel }} + ORIGIN: ${{ needs.process.outputs.origin }} + VERSION: ${{ inputs.version }} run: | mkdir ~/build cd bundle/docker docker compose up --build linux_${{ matrix.platform }} sudo chown "${USER}:docker" ~/build/${{ matrix.exe }} + sudo chown "${USER}:docker" ~/build/${{ matrix.exe }}.zip chmod +x ~/build/${{ matrix.exe }} ~/build/${{ matrix.exe }} --version - name: Verify --update-to @@ -169,6 +171,7 @@ jobs: name: build-bin-${{ github.job }}_${{ matrix.platform }} path: | ~/build/${{ matrix.exe }} + ~/build/${{ matrix.exe }}.zip compression-level: 0 macos: diff --git a/bundle/docker/compose.yml b/bundle/docker/compose.yml index 7677f00be..30a28d666 100644 --- a/bundle/docker/compose.yml +++ b/bundle/docker/compose.yml @@ -7,9 +7,10 @@ services: args: BASEIMAGE: ghcr.io/bashonly/manylinux2014_x86_64_builds:latest environment: - channel: ${channel} - origin: ${origin} - version: ${version} + EXE_NAME: ${EXE_NAME} + CHANNEL: ${CHANNEL} + ORIGIN: ${ORIGIN} + VERSION: ${VERSION} volumes: - ~/build:/build - ../..:/yt-dlp @@ -21,9 +22,10 @@ services: args: BASEIMAGE: ghcr.io/bashonly/manylinux2014_aarch64_builds:latest environment: - channel: ${channel} - origin: ${origin} - version: ${version} + EXE_NAME: ${EXE_NAME} + CHANNEL: ${CHANNEL} + ORIGIN: ${ORIGIN} + VERSION: ${VERSION} volumes: - ~/build:/build - ../..:/yt-dlp diff --git a/bundle/docker/linux/entrypoint.sh b/bundle/docker/linux/entrypoint.sh index d18c49c36..dba214801 100755 --- a/bundle/docker/linux/entrypoint.sh +++ b/bundle/docker/linux/entrypoint.sh @@ -6,6 +6,10 @@ source ~/yt-dlp-build-venv/bin/activate python3 -m devscripts.install_deps -o --include build python3 -m devscripts.install_deps --include secretstorage --include curl-cffi --include pyinstaller python3 -m devscripts.make_lazy_extractors -python3 devscripts/update-version.py -c "${channel}" -r "${origin}" "${version}" +python3 devscripts/update-version.py -c "${CHANNEL}" -r "${ORIGIN}" "${VERSION}" +python3 -m bundle.pyinstaller --onedir +pushd "./dist/${EXE_NAME}" +zip -r "/build/${EXE_NAME}.zip" . +popd python3 -m bundle.pyinstaller -mv dist/* /build/ +mv "./dist/${EXE_NAME}" /build/