]>
Commit | Line | Data |
---|---|---|
29cb20bd SS |
1 | name: Build Artifacts |
2 | on: | |
3 | workflow_call: | |
4 | inputs: | |
5 | version: | |
6 | required: true | |
7 | type: string | |
8 | channel: | |
9 | required: false | |
10 | default: stable | |
11 | type: string | |
12 | unix: | |
13 | default: true | |
14 | type: boolean | |
ac817bc8 SS |
15 | linux_static: |
16 | default: true | |
17 | type: boolean | |
29cb20bd SS |
18 | linux_arm: |
19 | default: true | |
20 | type: boolean | |
21 | macos: | |
22 | default: true | |
23 | type: boolean | |
24 | macos_legacy: | |
25 | default: true | |
26 | type: boolean | |
27 | windows: | |
28 | default: true | |
29 | type: boolean | |
30 | windows32: | |
31 | default: true | |
32 | type: boolean | |
20314dd4 | 33 | origin: |
34 | required: false | |
35 | default: '' | |
36 | type: string | |
12647e03 SS |
37 | secrets: |
38 | GPG_SIGNING_KEY: | |
39 | required: false | |
29cb20bd SS |
40 | |
41 | workflow_dispatch: | |
42 | inputs: | |
43 | version: | |
20314dd4 | 44 | description: | |
45 | VERSION: yyyy.mm.dd[.rev] or rev | |
29cb20bd SS |
46 | required: true |
47 | type: string | |
48 | channel: | |
20314dd4 | 49 | description: | |
50 | SOURCE of this build's updates: stable/nightly/master/<repo> | |
29cb20bd SS |
51 | required: true |
52 | default: stable | |
53 | type: string | |
54 | unix: | |
ac817bc8 SS |
55 | description: yt-dlp, yt-dlp.tar.gz |
56 | default: true | |
57 | type: boolean | |
58 | linux_static: | |
59 | description: yt-dlp_linux | |
29cb20bd SS |
60 | default: true |
61 | type: boolean | |
62 | linux_arm: | |
63 | description: yt-dlp_linux_aarch64, yt-dlp_linux_armv7l | |
64 | default: true | |
65 | type: boolean | |
66 | macos: | |
67 | description: yt-dlp_macos, yt-dlp_macos.zip | |
68 | default: true | |
69 | type: boolean | |
70 | macos_legacy: | |
71 | description: yt-dlp_macos_legacy | |
72 | default: true | |
73 | type: boolean | |
74 | windows: | |
75 | description: yt-dlp.exe, yt-dlp_min.exe, yt-dlp_win.zip | |
76 | default: true | |
77 | type: boolean | |
78 | windows32: | |
79 | description: yt-dlp_x86.exe | |
80 | default: true | |
81 | type: boolean | |
20314dd4 | 82 | origin: |
632b8ee5 | 83 | description: Origin |
20314dd4 | 84 | required: false |
632b8ee5 | 85 | default: 'current repo' |
20314dd4 | 86 | type: choice |
87 | options: | |
632b8ee5 | 88 | - 'current repo' |
29cb20bd | 89 | |
c789fb77 A |
90 | permissions: |
91 | contents: read | |
915f2a92 U |
92 | |
93 | jobs: | |
20314dd4 | 94 | process: |
95 | runs-on: ubuntu-latest | |
96 | outputs: | |
97 | origin: ${{ steps.process_origin.outputs.origin }} | |
98 | steps: | |
99 | - name: Process origin | |
100 | id: process_origin | |
101 | run: | | |
632b8ee5 | 102 | echo "origin=${{ inputs.origin == 'current repo' && github.repository || inputs.origin }}" | tee "$GITHUB_OUTPUT" |
20314dd4 | 103 | |
29cb20bd | 104 | unix: |
20314dd4 | 105 | needs: process |
29cb20bd | 106 | if: inputs.unix |
a6858cda | 107 | runs-on: ubuntu-latest |
b5899f4f | 108 | steps: |
5438593a | 109 | - uses: actions/checkout@v4 |
17b96974 | 110 | with: |
111 | fetch-depth: 0 # Needed for changelog | |
b14e818b | 112 | - uses: actions/setup-python@v5 |
29cb20bd SS |
113 | with: |
114 | python-version: "3.10" | |
29cb20bd SS |
115 | - name: Install Requirements |
116 | run: | | |
1d03633c | 117 | sudo apt -y install zip pandoc man sed |
29cb20bd SS |
118 | - name: Prepare |
119 | run: | | |
20314dd4 | 120 | python devscripts/update-version.py -c "${{ inputs.channel }}" -r "${{ needs.process.outputs.origin }}" "${{ inputs.version }}" |
17b96974 | 121 | python devscripts/update_changelog.py -vv |
b5899f4f | 122 | python devscripts/make_lazy_extractors.py |
29cb20bd SS |
123 | - name: Build Unix platform-independent binary |
124 | run: | | |
b5899f4f | 125 | make all tar |
b73193c9 | 126 | - name: Verify --update-to |
127 | if: vars.UPDATE_TO_VERIFICATION | |
128 | run: | | |
ac817bc8 SS |
129 | chmod +x ./yt-dlp |
130 | cp ./yt-dlp ./yt-dlp_downgraded | |
131 | version="$(./yt-dlp --version)" | |
132 | ./yt-dlp_downgraded -v --update-to yt-dlp/yt-dlp@2023.03.04 | |
133 | downgraded_version="$(./yt-dlp_downgraded --version)" | |
134 | [[ "$version" != "$downgraded_version" ]] | |
29cb20bd | 135 | - name: Upload artifacts |
3876429d | 136 | uses: actions/upload-artifact@v4 |
29cb20bd | 137 | with: |
eabbccc4 | 138 | name: build-bin-${{ github.job }} |
29cb20bd SS |
139 | path: | |
140 | yt-dlp | |
141 | yt-dlp.tar.gz | |
ac817bc8 SS |
142 | compression-level: 0 |
143 | ||
144 | linux_static: | |
145 | needs: process | |
146 | if: inputs.linux_static | |
147 | runs-on: ubuntu-latest | |
148 | steps: | |
149 | - uses: actions/checkout@v4 | |
150 | - name: Build static executable | |
151 | env: | |
152 | channel: ${{ inputs.channel }} | |
153 | origin: ${{ needs.process.outputs.origin }} | |
154 | version: ${{ inputs.version }} | |
155 | run: | | |
156 | mkdir ~/build | |
157 | cd bundle/docker | |
158 | docker compose up --build static | |
159 | sudo chown "${USER}:docker" ~/build/yt-dlp_linux | |
160 | - name: Verify --update-to | |
161 | if: vars.UPDATE_TO_VERIFICATION | |
162 | run: | | |
163 | chmod +x ~/build/yt-dlp_linux | |
164 | cp ~/build/yt-dlp_linux ~/build/yt-dlp_linux_downgraded | |
165 | version="$(~/build/yt-dlp_linux --version)" | |
166 | ~/build/yt-dlp_linux_downgraded -v --update-to yt-dlp/yt-dlp@2023.03.04 | |
167 | downgraded_version="$(~/build/yt-dlp_linux_downgraded --version)" | |
168 | [[ "$version" != "$downgraded_version" ]] | |
169 | - name: Upload artifacts | |
170 | uses: actions/upload-artifact@v4 | |
171 | with: | |
172 | name: build-bin-${{ github.job }} | |
173 | path: | | |
174 | ~/build/yt-dlp_linux | |
3876429d | 175 | compression-level: 0 |
29cb20bd SS |
176 | |
177 | linux_arm: | |
20314dd4 | 178 | needs: process |
29cb20bd | 179 | if: inputs.linux_arm |
17fc3dc4 | 180 | permissions: |
29cb20bd SS |
181 | contents: read |
182 | packages: write # for creating cache | |
17fc3dc4 | 183 | runs-on: ubuntu-latest |
17fc3dc4 M |
184 | strategy: |
185 | matrix: | |
186 | architecture: | |
29cb20bd SS |
187 | - armv7 |
188 | - aarch64 | |
17fc3dc4 M |
189 | |
190 | steps: | |
5438593a | 191 | - uses: actions/checkout@v4 |
29cb20bd SS |
192 | with: |
193 | path: ./repo | |
194 | - name: Virtualized Install, Prepare & Build | |
195 | uses: yt-dlp/run-on-arch-action@v2 | |
196 | with: | |
197 | # Ref: https://github.com/uraimo/run-on-arch-action/issues/55 | |
198 | env: | | |
199 | GITHUB_WORKFLOW: build | |
200 | githubToken: ${{ github.token }} # To cache image | |
201 | arch: ${{ matrix.architecture }} | |
202 | distro: ubuntu18.04 # Standalone executable should be built on minimum supported OS | |
203 | dockerRunArgs: --volume "${PWD}/repo:/repo" | |
204 | install: | # Installing Python 3.10 from the Deadsnakes repo raises errors | |
205 | apt update | |
92039763 | 206 | apt -y install zlib1g-dev libffi-dev python3.8 python3.8-dev python3.8-distutils python3-pip |
29cb20bd | 207 | python3.8 -m pip install -U pip setuptools wheel |
b8a433aa | 208 | # Cannot access any files from the repo directory at this stage |
92039763 | 209 | python3.8 -m pip install -U Pyinstaller mutagen pycryptodomex websockets brotli certifi secretstorage cffi |
29cb20bd SS |
210 | |
211 | run: | | |
212 | cd repo | |
b8a433aa | 213 | python3.8 devscripts/install_deps.py -o --include build |
214 | python3.8 devscripts/install_deps.py --include pyinstaller --include secretstorage # Cached version may be out of date | |
20314dd4 | 215 | python3.8 devscripts/update-version.py -c "${{ inputs.channel }}" -r "${{ needs.process.outputs.origin }}" "${{ inputs.version }}" |
29cb20bd | 216 | python3.8 devscripts/make_lazy_extractors.py |
a1b77842 | 217 | python3.8 -m bundle.pyinstaller |
29cb20bd | 218 | |
b73193c9 | 219 | if ${{ vars.UPDATE_TO_VERIFICATION && 'true' || 'false' }}; then |
220 | arch="${{ (matrix.architecture == 'armv7' && 'armv7l') || matrix.architecture }}" | |
221 | chmod +x ./dist/yt-dlp_linux_${arch} | |
222 | cp ./dist/yt-dlp_linux_${arch} ./dist/yt-dlp_linux_${arch}_downgraded | |
223 | version="$(./dist/yt-dlp_linux_${arch} --version)" | |
224 | ./dist/yt-dlp_linux_${arch}_downgraded -v --update-to yt-dlp/yt-dlp@2023.03.04 | |
225 | downgraded_version="$(./dist/yt-dlp_linux_${arch}_downgraded --version)" | |
226 | [[ "$version" != "$downgraded_version" ]] | |
227 | fi | |
228 | ||
29cb20bd | 229 | - name: Upload artifacts |
3876429d | 230 | uses: actions/upload-artifact@v4 |
29cb20bd | 231 | with: |
eabbccc4 | 232 | name: build-bin-linux_${{ matrix.architecture }} |
29cb20bd SS |
233 | path: | # run-on-arch-action designates armv7l as armv7 |
234 | repo/dist/yt-dlp_linux_${{ (matrix.architecture == 'armv7' && 'armv7l') || matrix.architecture }} | |
3876429d | 235 | compression-level: 0 |
29cb20bd SS |
236 | |
237 | macos: | |
20314dd4 | 238 | needs: process |
29cb20bd | 239 | if: inputs.macos |
03334d63 | 240 | runs-on: macos-12 |
0e5927ee R |
241 | |
242 | steps: | |
5438593a | 243 | - uses: actions/checkout@v4 |
44a79958 | 244 | # NB: Building universal2 does not work with python from actions/setup-python |
29cb20bd SS |
245 | - name: Install Requirements |
246 | run: | | |
0e5927ee | 247 | brew install coreutils |
b8a433aa | 248 | python3 devscripts/install_deps.py --user -o --include build |
58dd0f8d | 249 | python3 devscripts/install_deps.py --print --include pyinstaller > requirements.txt |
44a79958 | 250 | # We need to ignore wheels otherwise we break universal2 builds |
b8a433aa | 251 | python3 -m pip install -U --user --no-binary :all: -r requirements.txt |
52f5be1f | 252 | # We need to fuse our own universal2 wheels for curl_cffi |
253 | python3 -m pip install -U --user delocate | |
254 | mkdir curl_cffi_whls curl_cffi_universal2 | |
02483bea | 255 | python3 devscripts/install_deps.py --print -o --include curl-cffi > requirements.txt |
52f5be1f | 256 | for platform in "macosx_11_0_arm64" "macosx_11_0_x86_64"; do |
257 | python3 -m pip download \ | |
258 | --only-binary=:all: \ | |
259 | --platform "${platform}" \ | |
260 | --pre -d curl_cffi_whls \ | |
261 | -r requirements.txt | |
262 | done | |
5fdd1300 | 263 | ( # Overwrite x86_64-only libs with fat/universal2 libs or else Pyinstaller will do the opposite |
264 | # See https://github.com/yt-dlp/yt-dlp/pull/10069 | |
265 | cd curl_cffi_whls | |
266 | mkdir -p curl_cffi/.dylibs | |
267 | python_libdir=$(python3 -c 'import sys; from pathlib import Path; print(Path(sys.path[1]).parent)') | |
268 | for dylib in lib{ssl,crypto}.3.dylib; do | |
269 | cp "${python_libdir}/${dylib}" "curl_cffi/.dylibs/${dylib}" | |
270 | for wheel in curl_cffi*macos*x86_64.whl; do | |
271 | zip "${wheel}" "curl_cffi/.dylibs/${dylib}" | |
272 | done | |
273 | done | |
274 | ) | |
52f5be1f | 275 | python3 -m delocate.cmd.delocate_fuse curl_cffi_whls/curl_cffi*.whl -w curl_cffi_universal2 |
276 | python3 -m delocate.cmd.delocate_fuse curl_cffi_whls/cffi*.whl -w curl_cffi_universal2 | |
277 | cd curl_cffi_universal2 | |
5fdd1300 | 278 | for wheel in ./*cffi*.whl; do mv -n -- "${wheel}" "${wheel/x86_64/universal2}"; done |
279 | python3 -m pip install -U --user ./*cffi*.whl | |
b5899f4f | 280 | |
29cb20bd SS |
281 | - name: Prepare |
282 | run: | | |
20314dd4 | 283 | python3 devscripts/update-version.py -c "${{ inputs.channel }}" -r "${{ needs.process.outputs.origin }}" "${{ inputs.version }}" |
44a79958 | 284 | python3 devscripts/make_lazy_extractors.py |
29cb20bd SS |
285 | - name: Build |
286 | run: | | |
a1b77842 | 287 | python3 -m bundle.pyinstaller --target-architecture universal2 --onedir |
b5899f4f | 288 | (cd ./dist/yt-dlp_macos && zip -r ../yt-dlp_macos.zip .) |
a1b77842 | 289 | python3 -m bundle.pyinstaller --target-architecture universal2 |
b5899f4f | 290 | |
b73193c9 | 291 | - name: Verify --update-to |
292 | if: vars.UPDATE_TO_VERIFICATION | |
293 | run: | | |
294 | chmod +x ./dist/yt-dlp_macos | |
295 | cp ./dist/yt-dlp_macos ./dist/yt-dlp_macos_downgraded | |
296 | version="$(./dist/yt-dlp_macos --version)" | |
297 | ./dist/yt-dlp_macos_downgraded -v --update-to yt-dlp/yt-dlp@2023.03.04 | |
298 | downgraded_version="$(./dist/yt-dlp_macos_downgraded --version)" | |
299 | [[ "$version" != "$downgraded_version" ]] | |
300 | ||
29cb20bd | 301 | - name: Upload artifacts |
3876429d | 302 | uses: actions/upload-artifact@v4 |
29cb20bd | 303 | with: |
eabbccc4 | 304 | name: build-bin-${{ github.job }} |
29cb20bd SS |
305 | path: | |
306 | dist/yt-dlp_macos | |
307 | dist/yt-dlp_macos.zip | |
3876429d | 308 | compression-level: 0 |
b5899f4f | 309 | |
29cb20bd | 310 | macos_legacy: |
20314dd4 | 311 | needs: process |
29cb20bd | 312 | if: inputs.macos_legacy |
1a366403 | 313 | runs-on: macos-12 |
28cdb605 | 314 | |
6d916fe7 | 315 | steps: |
5438593a | 316 | - uses: actions/checkout@v4 |
29cb20bd SS |
317 | - name: Install Python |
318 | # We need the official Python, because the GA ones only support newer macOS versions | |
319 | env: | |
320 | PYTHON_VERSION: 3.10.5 | |
321 | MACOSX_DEPLOYMENT_TARGET: 10.9 # Used up by the Python build tools | |
322 | run: | | |
6d916fe7 SL |
323 | # Hack to get the latest patch version. Uncomment if needed |
324 | #brew install python@3.10 | |
325 | #export PYTHON_VERSION=$( $(brew --prefix)/opt/python@3.10/bin/python3 --version | cut -d ' ' -f 2 ) | |
5fdd1300 | 326 | curl "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macos11.pkg" -o "python.pkg" |
6d916fe7 SL |
327 | sudo installer -pkg python.pkg -target / |
328 | python3 --version | |
29cb20bd SS |
329 | - name: Install Requirements |
330 | run: | | |
6d916fe7 | 331 | brew install coreutils |
b8a433aa | 332 | python3 devscripts/install_deps.py --user -o --include build |
b19ae095 | 333 | python3 devscripts/install_deps.py --user --include pyinstaller |
6d916fe7 | 334 | |
29cb20bd SS |
335 | - name: Prepare |
336 | run: | | |
20314dd4 | 337 | python3 devscripts/update-version.py -c "${{ inputs.channel }}" -r "${{ needs.process.outputs.origin }}" "${{ inputs.version }}" |
6d916fe7 | 338 | python3 devscripts/make_lazy_extractors.py |
29cb20bd SS |
339 | - name: Build |
340 | run: | | |
a1b77842 | 341 | python3 -m bundle.pyinstaller |
c4b6c5c7 | 342 | mv dist/yt-dlp_macos dist/yt-dlp_macos_legacy |
6d916fe7 | 343 | |
b73193c9 | 344 | - name: Verify --update-to |
345 | if: vars.UPDATE_TO_VERIFICATION | |
346 | run: | | |
347 | chmod +x ./dist/yt-dlp_macos_legacy | |
348 | cp ./dist/yt-dlp_macos_legacy ./dist/yt-dlp_macos_legacy_downgraded | |
349 | version="$(./dist/yt-dlp_macos_legacy --version)" | |
350 | ./dist/yt-dlp_macos_legacy_downgraded -v --update-to yt-dlp/yt-dlp@2023.03.04 | |
351 | downgraded_version="$(./dist/yt-dlp_macos_legacy_downgraded --version)" | |
352 | [[ "$version" != "$downgraded_version" ]] | |
353 | ||
29cb20bd | 354 | - name: Upload artifacts |
3876429d | 355 | uses: actions/upload-artifact@v4 |
29cb20bd | 356 | with: |
eabbccc4 | 357 | name: build-bin-${{ github.job }} |
29cb20bd SS |
358 | path: | |
359 | dist/yt-dlp_macos_legacy | |
3876429d | 360 | compression-level: 0 |
6d916fe7 | 361 | |
29cb20bd | 362 | windows: |
20314dd4 | 363 | needs: process |
29cb20bd | 364 | if: inputs.windows |
915f2a92 | 365 | runs-on: windows-latest |
47930b73 | 366 | |
915f2a92 | 367 | steps: |
5438593a | 368 | - uses: actions/checkout@v4 |
b14e818b | 369 | - uses: actions/setup-python@v5 |
29cb20bd SS |
370 | with: # 3.8 is used for Win7 support |
371 | python-version: "3.8" | |
372 | - name: Install Requirements | |
373 | run: | # Custom pyinstaller built with https://github.com/yt-dlp/pyinstaller-builds | |
b8a433aa | 374 | python devscripts/install_deps.py -o --include build |
3f799953 | 375 | python devscripts/install_deps.py --include curl-cffi |
5fdd1300 | 376 | python -m pip install -U "https://yt-dlp.github.io/Pyinstaller-Builds/x86_64/pyinstaller-6.7.0-py3-none-any.whl" |
b5899f4f | 377 | |
29cb20bd SS |
378 | - name: Prepare |
379 | run: | | |
20314dd4 | 380 | python devscripts/update-version.py -c "${{ inputs.channel }}" -r "${{ needs.process.outputs.origin }}" "${{ inputs.version }}" |
b5899f4f | 381 | python devscripts/make_lazy_extractors.py |
29cb20bd SS |
382 | - name: Build |
383 | run: | | |
a1b77842 | 384 | python -m bundle.pyinstaller |
385 | python -m bundle.pyinstaller --onedir | |
3f799953 | 386 | Move-Item ./dist/yt-dlp.exe ./dist/yt-dlp_real.exe |
b5899f4f | 387 | Compress-Archive -Path ./dist/yt-dlp/* -DestinationPath ./dist/yt-dlp_win.zip |
c4b6c5c7 | 388 | |
3f799953 SS |
389 | - name: Install Requirements (py2exe) |
390 | run: | | |
391 | python devscripts/install_deps.py --include py2exe | |
392 | - name: Build (py2exe) | |
393 | run: | | |
394 | python -m bundle.py2exe | |
395 | Move-Item ./dist/yt-dlp.exe ./dist/yt-dlp_min.exe | |
396 | Move-Item ./dist/yt-dlp_real.exe ./dist/yt-dlp.exe | |
397 | ||
b73193c9 | 398 | - name: Verify --update-to |
399 | if: vars.UPDATE_TO_VERIFICATION | |
400 | run: | | |
401 | foreach ($name in @("yt-dlp","yt-dlp_min")) { | |
402 | Copy-Item "./dist/${name}.exe" "./dist/${name}_downgraded.exe" | |
403 | $version = & "./dist/${name}.exe" --version | |
404 | & "./dist/${name}_downgraded.exe" -v --update-to yt-dlp/yt-dlp@2023.03.04 | |
405 | $downgraded_version = & "./dist/${name}_downgraded.exe" --version | |
406 | if ($version -eq $downgraded_version) { | |
407 | exit 1 | |
408 | } | |
409 | } | |
410 | ||
29cb20bd | 411 | - name: Upload artifacts |
3876429d | 412 | uses: actions/upload-artifact@v4 |
29cb20bd | 413 | with: |
eabbccc4 | 414 | name: build-bin-${{ github.job }} |
29cb20bd SS |
415 | path: | |
416 | dist/yt-dlp.exe | |
417 | dist/yt-dlp_min.exe | |
418 | dist/yt-dlp_win.zip | |
3876429d | 419 | compression-level: 0 |
386cdfdb | 420 | |
29cb20bd | 421 | windows32: |
20314dd4 | 422 | needs: process |
29cb20bd | 423 | if: inputs.windows32 |
915f2a92 | 424 | runs-on: windows-latest |
47930b73 | 425 | |
915f2a92 | 426 | steps: |
5438593a | 427 | - uses: actions/checkout@v4 |
b14e818b | 428 | - uses: actions/setup-python@v5 |
f4b95aca | 429 | with: |
430 | python-version: "3.8" | |
29cb20bd SS |
431 | architecture: "x86" |
432 | - name: Install Requirements | |
433 | run: | | |
b8a433aa | 434 | python devscripts/install_deps.py -o --include build |
435 | python devscripts/install_deps.py | |
5fdd1300 | 436 | python -m pip install -U "https://yt-dlp.github.io/Pyinstaller-Builds/i686/pyinstaller-6.7.0-py3-none-any.whl" |
b5899f4f | 437 | |
29cb20bd SS |
438 | - name: Prepare |
439 | run: | | |
20314dd4 | 440 | python devscripts/update-version.py -c "${{ inputs.channel }}" -r "${{ needs.process.outputs.origin }}" "${{ inputs.version }}" |
b5899f4f | 441 | python devscripts/make_lazy_extractors.py |
29cb20bd SS |
442 | - name: Build |
443 | run: | | |
a1b77842 | 444 | python -m bundle.pyinstaller |
b5899f4f | 445 | |
b73193c9 | 446 | - name: Verify --update-to |
447 | if: vars.UPDATE_TO_VERIFICATION | |
448 | run: | | |
449 | foreach ($name in @("yt-dlp_x86")) { | |
450 | Copy-Item "./dist/${name}.exe" "./dist/${name}_downgraded.exe" | |
451 | $version = & "./dist/${name}.exe" --version | |
452 | & "./dist/${name}_downgraded.exe" -v --update-to yt-dlp/yt-dlp@2023.03.04 | |
453 | $downgraded_version = & "./dist/${name}_downgraded.exe" --version | |
454 | if ($version -eq $downgraded_version) { | |
455 | exit 1 | |
456 | } | |
457 | } | |
458 | ||
29cb20bd | 459 | - name: Upload artifacts |
3876429d | 460 | uses: actions/upload-artifact@v4 |
29cb20bd | 461 | with: |
eabbccc4 | 462 | name: build-bin-${{ github.job }} |
29cb20bd SS |
463 | path: | |
464 | dist/yt-dlp_x86.exe | |
3876429d | 465 | compression-level: 0 |
29cb20bd SS |
466 | |
467 | meta_files: | |
ac817bc8 | 468 | if: always() && !cancelled() |
29cb20bd | 469 | needs: |
20314dd4 | 470 | - process |
29cb20bd | 471 | - unix |
ac817bc8 | 472 | - linux_static |
29cb20bd SS |
473 | - linux_arm |
474 | - macos | |
475 | - macos_legacy | |
476 | - windows | |
477 | - windows32 | |
14b17a55 | 478 | runs-on: ubuntu-latest |
14b17a55 | 479 | steps: |
3876429d | 480 | - uses: actions/download-artifact@v4 |
481 | with: | |
482 | path: artifact | |
eabbccc4 | 483 | pattern: build-bin-* |
3876429d | 484 | merge-multiple: true |
b1f94422 | 485 | |
29cb20bd SS |
486 | - name: Make SHA2-SUMS files |
487 | run: | | |
488 | cd ./artifact/ | |
e8032503 | 489 | # make sure SHA sums are also printed to stdout |
5fdd1300 | 490 | sha256sum -- * | tee ../SHA2-256SUMS |
491 | sha512sum -- * | tee ../SHA2-512SUMS | |
c4b6c5c7 | 492 | |
29cb20bd SS |
493 | - name: Make Update spec |
494 | run: | | |
495 | cat >> _update_spec << EOF | |
496 | # This file is used for regulating self-update | |
f4b95aca | 497 | lock 2022.08.18.36 .+ Python 3\.6 |
498 | lock 2023.11.16 (?!win_x86_exe).+ Python 3\.7 | |
499 | lock 2023.11.16 win_x86_exe .+ Windows-(?:Vista|2008Server) | |
500 | lockV2 yt-dlp/yt-dlp 2022.08.18.36 .+ Python 3\.6 | |
501 | lockV2 yt-dlp/yt-dlp 2023.11.16 (?!win_x86_exe).+ Python 3\.7 | |
502 | lockV2 yt-dlp/yt-dlp 2023.11.16 win_x86_exe .+ Windows-(?:Vista|2008Server) | |
503 | lockV2 yt-dlp/yt-dlp-nightly-builds 2023.11.15.232826 (?!win_x86_exe).+ Python 3\.7 | |
504 | lockV2 yt-dlp/yt-dlp-nightly-builds 2023.11.15.232826 win_x86_exe .+ Windows-(?:Vista|2008Server) | |
505 | lockV2 yt-dlp/yt-dlp-master-builds 2023.11.15.232812 (?!win_x86_exe).+ Python 3\.7 | |
506 | lockV2 yt-dlp/yt-dlp-master-builds 2023.11.15.232812 win_x86_exe .+ Windows-(?:Vista|2008Server) | |
29cb20bd SS |
507 | EOF |
508 | ||
12647e03 SS |
509 | - name: Sign checksum files |
510 | env: | |
511 | GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | |
512 | if: env.GPG_SIGNING_KEY != '' | |
513 | run: | | |
514 | gpg --batch --import <<< "${{ secrets.GPG_SIGNING_KEY }}" | |
515 | for signfile in ./SHA*SUMS; do | |
516 | gpg --batch --detach-sign "$signfile" | |
517 | done | |
518 | ||
29cb20bd | 519 | - name: Upload artifacts |
3876429d | 520 | uses: actions/upload-artifact@v4 |
29cb20bd | 521 | with: |
3876429d | 522 | name: build-${{ github.job }} |
29cb20bd | 523 | path: | |
29cb20bd | 524 | _update_spec |
3876429d | 525 | SHA*SUMS* |
526 | compression-level: 0 | |
eabbccc4 | 527 | overwrite: true |