]>
Commit | Line | Data |
---|---|---|
1 | name: Build | |
2 | on: workflow_dispatch | |
3 | ||
4 | jobs: | |
5 | create_release: | |
6 | runs-on: ubuntu-latest | |
7 | outputs: | |
8 | version_suffix: ${{ steps.version_suffix.outputs.version_suffix }} | |
9 | ytdlp_version: ${{ steps.bump_version.outputs.ytdlp_version }} | |
10 | upload_url: ${{ steps.create_release.outputs.upload_url }} | |
11 | release_id: ${{ steps.create_release.outputs.id }} | |
12 | steps: | |
13 | - uses: actions/checkout@v2 | |
14 | with: | |
15 | fetch-depth: 0 | |
16 | - uses: actions/setup-python@v2 | |
17 | with: | |
18 | python-version: '3.10' | |
19 | ||
20 | - name: Set version suffix | |
21 | id: version_suffix | |
22 | env: | |
23 | PUSH_VERSION_COMMIT: ${{ secrets.PUSH_VERSION_COMMIT }} | |
24 | if: "env.PUSH_VERSION_COMMIT == ''" | |
25 | run: echo ::set-output name=version_suffix::$(date -u +"%H%M%S") | |
26 | - name: Bump version | |
27 | id: bump_version | |
28 | run: | | |
29 | python devscripts/update-version.py ${{ steps.version_suffix.outputs.version_suffix }} | |
30 | make issuetemplates | |
31 | ||
32 | - name: Push to release | |
33 | id: push_release | |
34 | run: | | |
35 | git config --global user.name github-actions | |
36 | git config --global user.email github-actions@example.com | |
37 | git add -u | |
38 | git commit -m "[version] update" -m "Created by: ${{ github.event.sender.login }}" -m ":ci skip all :ci run dl" | |
39 | git push origin --force ${{ github.event.ref }}:release | |
40 | echo ::set-output name=head_sha::$(git rev-parse HEAD) | |
41 | - name: Update master | |
42 | env: | |
43 | PUSH_VERSION_COMMIT: ${{ secrets.PUSH_VERSION_COMMIT }} | |
44 | if: "env.PUSH_VERSION_COMMIT != ''" | |
45 | run: git push origin ${{ github.event.ref }} | |
46 | - name: Get Changelog | |
47 | run: | | |
48 | changelog=$(grep -oPz '(?s)(?<=### ${{ steps.bump_version.outputs.ytdlp_version }}\n{2}).+?(?=\n{2,3}###)' Changelog.md) || true | |
49 | echo "changelog<<EOF" >> $GITHUB_ENV | |
50 | echo "$changelog" >> $GITHUB_ENV | |
51 | echo "EOF" >> $GITHUB_ENV | |
52 | ||
53 | - name: Create Release | |
54 | id: create_release | |
55 | uses: actions/create-release@v1 | |
56 | env: | |
57 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
58 | with: | |
59 | tag_name: ${{ steps.bump_version.outputs.ytdlp_version }} | |
60 | release_name: yt-dlp ${{ steps.bump_version.outputs.ytdlp_version }} | |
61 | commitish: ${{ steps.push_release.outputs.head_sha }} | |
62 | draft: true | |
63 | prerelease: false | |
64 | body: | | |
65 | #### [A description of the various files]((https://github.com/yt-dlp/yt-dlp#release-files)) are in the README | |
66 | ||
67 | --- | |
68 | <details open><summary><h3>Changelog</summary> | |
69 | <p> | |
70 | ||
71 | ${{ env.changelog }} | |
72 | ||
73 | </p> | |
74 | </details> | |
75 | ||
76 | ||
77 | build_unix: | |
78 | needs: create_release | |
79 | runs-on: ubuntu-18.04 # Standalone executable should be built on minimum supported OS | |
80 | outputs: | |
81 | sha256_bin: ${{ steps.get_sha.outputs.sha256_bin }} | |
82 | sha512_bin: ${{ steps.get_sha.outputs.sha512_bin }} | |
83 | sha256_tar: ${{ steps.get_sha.outputs.sha256_tar }} | |
84 | sha512_tar: ${{ steps.get_sha.outputs.sha512_tar }} | |
85 | sha256_linux: ${{ steps.get_sha.outputs.sha256_linux }} | |
86 | sha512_linux: ${{ steps.get_sha.outputs.sha512_linux }} | |
87 | sha256_linux_zip: ${{ steps.get_sha.outputs.sha256_linux_zip }} | |
88 | sha512_linux_zip: ${{ steps.get_sha.outputs.sha512_linux_zip }} | |
89 | ||
90 | steps: | |
91 | - uses: actions/checkout@v2 | |
92 | - uses: actions/setup-python@v2 | |
93 | with: | |
94 | python-version: '3.10' | |
95 | - name: Install Requirements | |
96 | run: | | |
97 | sudo apt-get -y install zip pandoc man | |
98 | python -m pip install --upgrade pip setuptools wheel twine | |
99 | python -m pip install Pyinstaller -r requirements.txt | |
100 | ||
101 | - name: Prepare | |
102 | run: | | |
103 | python devscripts/update-version.py ${{ needs.create_release.outputs.version_suffix }} | |
104 | python devscripts/make_lazy_extractors.py | |
105 | - name: Build Unix executables | |
106 | run: | | |
107 | make all tar | |
108 | python pyinst.py --onedir | |
109 | (cd ./dist/yt-dlp_linux && zip -r ../yt-dlp_linux.zip .) | |
110 | python pyinst.py | |
111 | - name: Get SHA2-SUMS | |
112 | id: get_sha | |
113 | run: | | |
114 | echo "::set-output name=sha256_bin::$(sha256sum yt-dlp | awk '{print $1}')" | |
115 | echo "::set-output name=sha512_bin::$(sha512sum yt-dlp | awk '{print $1}')" | |
116 | echo "::set-output name=sha256_tar::$(sha256sum yt-dlp.tar.gz | awk '{print $1}')" | |
117 | echo "::set-output name=sha512_tar::$(sha512sum yt-dlp.tar.gz | awk '{print $1}')" | |
118 | echo "::set-output name=sha256_linux::$(sha256sum dist/yt-dlp_linux | awk '{print $1}')" | |
119 | echo "::set-output name=sha512_linux::$(sha512sum dist/yt-dlp_linux | awk '{print $1}')" | |
120 | echo "::set-output name=sha256_linux_zip::$(sha256sum dist/yt-dlp_linux.zip | awk '{print $1}')" | |
121 | echo "::set-output name=sha512_linux_zip::$(sha512sum dist/yt-dlp_linux.zip | awk '{print $1}')" | |
122 | ||
123 | - name: Upload zip binary | |
124 | uses: actions/upload-release-asset@v1 | |
125 | env: | |
126 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
127 | with: | |
128 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
129 | asset_path: ./yt-dlp | |
130 | asset_name: yt-dlp | |
131 | asset_content_type: application/octet-stream | |
132 | - name: Upload Source tar | |
133 | uses: actions/upload-release-asset@v1 | |
134 | env: | |
135 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
136 | with: | |
137 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
138 | asset_path: ./yt-dlp.tar.gz | |
139 | asset_name: yt-dlp.tar.gz | |
140 | asset_content_type: application/gzip | |
141 | - name: Upload standalone binary | |
142 | uses: actions/upload-release-asset@v1 | |
143 | env: | |
144 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
145 | with: | |
146 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
147 | asset_path: ./dist/yt-dlp_linux | |
148 | asset_name: yt-dlp_linux | |
149 | asset_content_type: application/octet-stream | |
150 | - name: Upload onedir binary | |
151 | uses: actions/upload-release-asset@v1 | |
152 | env: | |
153 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
154 | with: | |
155 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
156 | asset_path: ./dist/yt-dlp_linux.zip | |
157 | asset_name: yt-dlp_linux.zip | |
158 | asset_content_type: application/zip | |
159 | ||
160 | - name: Build and publish on PyPi | |
161 | env: | |
162 | TWINE_USERNAME: __token__ | |
163 | TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
164 | if: "env.TWINE_PASSWORD != ''" | |
165 | run: | | |
166 | rm -rf dist/* | |
167 | python setup.py sdist bdist_wheel | |
168 | twine upload dist/* | |
169 | ||
170 | - name: Install SSH private key for Homebrew | |
171 | env: | |
172 | BREW_TOKEN: ${{ secrets.BREW_TOKEN }} | |
173 | if: "env.BREW_TOKEN != ''" | |
174 | uses: yt-dlp/ssh-agent@v0.5.3 | |
175 | with: | |
176 | ssh-private-key: ${{ env.BREW_TOKEN }} | |
177 | - name: Update Homebrew Formulae | |
178 | env: | |
179 | BREW_TOKEN: ${{ secrets.BREW_TOKEN }} | |
180 | if: "env.BREW_TOKEN != ''" | |
181 | run: | | |
182 | git clone git@github.com:yt-dlp/homebrew-taps taps/ | |
183 | python devscripts/update-formulae.py taps/Formula/yt-dlp.rb "${{ needs.create_release.outputs.ytdlp_version }}" | |
184 | git -C taps/ config user.name github-actions | |
185 | git -C taps/ config user.email github-actions@example.com | |
186 | git -C taps/ commit -am 'yt-dlp: ${{ needs.create_release.outputs.ytdlp_version }}' | |
187 | git -C taps/ push | |
188 | ||
189 | ||
190 | build_macos: | |
191 | runs-on: macos-11 | |
192 | needs: create_release | |
193 | outputs: | |
194 | sha256_macos: ${{ steps.get_sha.outputs.sha256_macos }} | |
195 | sha512_macos: ${{ steps.get_sha.outputs.sha512_macos }} | |
196 | sha256_macos_zip: ${{ steps.get_sha.outputs.sha256_macos_zip }} | |
197 | sha512_macos_zip: ${{ steps.get_sha.outputs.sha512_macos_zip }} | |
198 | ||
199 | steps: | |
200 | - uses: actions/checkout@v2 | |
201 | # NB: In order to create a universal2 application, the version of python3 in /usr/bin has to be used | |
202 | - name: Install Requirements | |
203 | run: | | |
204 | brew install coreutils | |
205 | /usr/bin/python3 -m pip install -U --user pip Pyinstaller -r requirements.txt | |
206 | ||
207 | - name: Prepare | |
208 | run: | | |
209 | /usr/bin/python3 devscripts/update-version.py ${{ needs.create_release.outputs.version_suffix }} | |
210 | /usr/bin/python3 devscripts/make_lazy_extractors.py | |
211 | - name: Build | |
212 | run: | | |
213 | /usr/bin/python3 pyinst.py --target-architecture universal2 --onedir | |
214 | (cd ./dist/yt-dlp_macos && zip -r ../yt-dlp_macos.zip .) | |
215 | /usr/bin/python3 pyinst.py --target-architecture universal2 | |
216 | - name: Get SHA2-SUMS | |
217 | id: get_sha | |
218 | run: | | |
219 | echo "::set-output name=sha256_macos::$(sha256sum dist/yt-dlp_macos | awk '{print $1}')" | |
220 | echo "::set-output name=sha512_macos::$(sha512sum dist/yt-dlp_macos | awk '{print $1}')" | |
221 | echo "::set-output name=sha256_macos_zip::$(sha256sum dist/yt-dlp_macos.zip | awk '{print $1}')" | |
222 | echo "::set-output name=sha512_macos_zip::$(sha512sum dist/yt-dlp_macos.zip | awk '{print $1}')" | |
223 | ||
224 | - name: Upload standalone binary | |
225 | uses: actions/upload-release-asset@v1 | |
226 | env: | |
227 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
228 | with: | |
229 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
230 | asset_path: ./dist/yt-dlp_macos | |
231 | asset_name: yt-dlp_macos | |
232 | asset_content_type: application/octet-stream | |
233 | - name: Upload onedir binary | |
234 | uses: actions/upload-release-asset@v1 | |
235 | env: | |
236 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
237 | with: | |
238 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
239 | asset_path: ./dist/yt-dlp_macos.zip | |
240 | asset_name: yt-dlp_macos.zip | |
241 | asset_content_type: application/zip | |
242 | ||
243 | ||
244 | build_macos_legacy: | |
245 | runs-on: macos-latest | |
246 | needs: create_release | |
247 | outputs: | |
248 | sha256_macos_legacy: ${{ steps.get_sha.outputs.sha256_macos_legacy }} | |
249 | sha512_macos_legacy: ${{ steps.get_sha.outputs.sha512_macos_legacy }} | |
250 | ||
251 | steps: | |
252 | - uses: actions/checkout@v2 | |
253 | - name: Install Python | |
254 | # We need the official Python, because the GA ones only support newer macOS versions | |
255 | env: | |
256 | PYTHON_VERSION: 3.10.5 | |
257 | MACOSX_DEPLOYMENT_TARGET: 10.9 # Used up by the Python build tools | |
258 | run: | | |
259 | # Hack to get the latest patch version. Uncomment if needed | |
260 | #brew install python@3.10 | |
261 | #export PYTHON_VERSION=$( $(brew --prefix)/opt/python@3.10/bin/python3 --version | cut -d ' ' -f 2 ) | |
262 | curl https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macos11.pkg -o "python.pkg" | |
263 | sudo installer -pkg python.pkg -target / | |
264 | python3 --version | |
265 | - name: Install Requirements | |
266 | run: | | |
267 | brew install coreutils | |
268 | python3 -m pip install -U --user pip Pyinstaller -r requirements.txt | |
269 | ||
270 | - name: Prepare | |
271 | run: | | |
272 | python3 devscripts/update-version.py ${{ needs.create_release.outputs.version_suffix }} | |
273 | python3 devscripts/make_lazy_extractors.py | |
274 | - name: Build | |
275 | run: | | |
276 | python3 pyinst.py | |
277 | - name: Get SHA2-SUMS | |
278 | id: get_sha | |
279 | run: | | |
280 | echo "::set-output name=sha256_macos_legacy::$(sha256sum dist/yt-dlp_macos | awk '{print $1}')" | |
281 | echo "::set-output name=sha512_macos_legacy::$(sha512sum dist/yt-dlp_macos | awk '{print $1}')" | |
282 | ||
283 | - name: Upload standalone binary | |
284 | uses: actions/upload-release-asset@v1 | |
285 | env: | |
286 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
287 | with: | |
288 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
289 | asset_path: ./dist/yt-dlp_macos | |
290 | asset_name: yt-dlp_macos_legacy | |
291 | asset_content_type: application/octet-stream | |
292 | ||
293 | ||
294 | build_windows: | |
295 | runs-on: windows-latest | |
296 | needs: create_release | |
297 | outputs: | |
298 | sha256_win: ${{ steps.get_sha.outputs.sha256_win }} | |
299 | sha512_win: ${{ steps.get_sha.outputs.sha512_win }} | |
300 | sha256_py2exe: ${{ steps.get_sha.outputs.sha256_py2exe }} | |
301 | sha512_py2exe: ${{ steps.get_sha.outputs.sha512_py2exe }} | |
302 | sha256_win_zip: ${{ steps.get_sha.outputs.sha256_win_zip }} | |
303 | sha512_win_zip: ${{ steps.get_sha.outputs.sha512_win_zip }} | |
304 | ||
305 | steps: | |
306 | - uses: actions/checkout@v2 | |
307 | - uses: actions/setup-python@v2 | |
308 | with: # 3.8 is used for Win7 support | |
309 | python-version: '3.8' | |
310 | - name: Install Requirements | |
311 | run: | # Custom pyinstaller built with https://github.com/yt-dlp/pyinstaller-builds | |
312 | python -m pip install --upgrade pip setuptools wheel py2exe | |
313 | pip install "https://yt-dlp.github.io/Pyinstaller-Builds/x86_64/pyinstaller-5.2-py3-none-any.whl" -r requirements.txt | |
314 | ||
315 | - name: Prepare | |
316 | run: | | |
317 | python devscripts/update-version.py ${{ needs.create_release.outputs.version_suffix }} | |
318 | python devscripts/make_lazy_extractors.py | |
319 | - name: Build | |
320 | run: | | |
321 | python setup.py py2exe | |
322 | Move-Item ./dist/yt-dlp.exe ./dist/yt-dlp_min.exe | |
323 | python pyinst.py | |
324 | python pyinst.py --onedir | |
325 | Compress-Archive -Path ./dist/yt-dlp/* -DestinationPath ./dist/yt-dlp_win.zip | |
326 | - name: Get SHA2-SUMS | |
327 | id: get_sha | |
328 | run: | | |
329 | echo "::set-output name=sha256_py2exe::$((Get-FileHash dist\yt-dlp_min.exe -Algorithm SHA256).Hash.ToLower())" | |
330 | echo "::set-output name=sha512_py2exe::$((Get-FileHash dist\yt-dlp_min.exe -Algorithm SHA512).Hash.ToLower())" | |
331 | echo "::set-output name=sha256_win::$((Get-FileHash dist\yt-dlp.exe -Algorithm SHA256).Hash.ToLower())" | |
332 | echo "::set-output name=sha512_win::$((Get-FileHash dist\yt-dlp.exe -Algorithm SHA512).Hash.ToLower())" | |
333 | echo "::set-output name=sha256_win_zip::$((Get-FileHash dist\yt-dlp_win.zip -Algorithm SHA256).Hash.ToLower())" | |
334 | echo "::set-output name=sha512_win_zip::$((Get-FileHash dist\yt-dlp_win.zip -Algorithm SHA512).Hash.ToLower())" | |
335 | ||
336 | - name: Upload py2exe binary | |
337 | uses: actions/upload-release-asset@v1 | |
338 | env: | |
339 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
340 | with: | |
341 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
342 | asset_path: ./dist/yt-dlp_min.exe | |
343 | asset_name: yt-dlp_min.exe | |
344 | asset_content_type: application/vnd.microsoft.portable-executable | |
345 | - name: Upload standalone binary | |
346 | uses: actions/upload-release-asset@v1 | |
347 | env: | |
348 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
349 | with: | |
350 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
351 | asset_path: ./dist/yt-dlp.exe | |
352 | asset_name: yt-dlp.exe | |
353 | asset_content_type: application/vnd.microsoft.portable-executable | |
354 | - name: Upload onedir binary | |
355 | uses: actions/upload-release-asset@v1 | |
356 | env: | |
357 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
358 | with: | |
359 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
360 | asset_path: ./dist/yt-dlp_win.zip | |
361 | asset_name: yt-dlp_win.zip | |
362 | asset_content_type: application/zip | |
363 | ||
364 | ||
365 | build_windows32: | |
366 | runs-on: windows-latest | |
367 | needs: create_release | |
368 | outputs: | |
369 | sha256_win32: ${{ steps.get_sha.outputs.sha256_win32 }} | |
370 | sha512_win32: ${{ steps.get_sha.outputs.sha512_win32 }} | |
371 | ||
372 | steps: | |
373 | - uses: actions/checkout@v2 | |
374 | - uses: actions/setup-python@v2 | |
375 | with: # 3.7 is used for Vista support. See https://github.com/yt-dlp/yt-dlp/issues/390 | |
376 | python-version: '3.7' | |
377 | architecture: 'x86' | |
378 | - name: Install Requirements | |
379 | run: | | |
380 | python -m pip install --upgrade pip setuptools wheel | |
381 | pip install "https://yt-dlp.github.io/Pyinstaller-Builds/i686/pyinstaller-5.2-py3-none-any.whl" -r requirements.txt | |
382 | ||
383 | - name: Prepare | |
384 | run: | | |
385 | python devscripts/update-version.py ${{ needs.create_release.outputs.version_suffix }} | |
386 | python devscripts/make_lazy_extractors.py | |
387 | - name: Build | |
388 | run: | | |
389 | python pyinst.py | |
390 | - name: Get SHA2-SUMS | |
391 | id: get_sha | |
392 | run: | | |
393 | echo "::set-output name=sha256_win32::$((Get-FileHash dist\yt-dlp_x86.exe -Algorithm SHA256).Hash.ToLower())" | |
394 | echo "::set-output name=sha512_win32::$((Get-FileHash dist\yt-dlp_x86.exe -Algorithm SHA512).Hash.ToLower())" | |
395 | ||
396 | - name: Upload standalone binary | |
397 | uses: actions/upload-release-asset@v1 | |
398 | env: | |
399 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
400 | with: | |
401 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
402 | asset_path: ./dist/yt-dlp_x86.exe | |
403 | asset_name: yt-dlp_x86.exe | |
404 | asset_content_type: application/vnd.microsoft.portable-executable | |
405 | ||
406 | ||
407 | finish: | |
408 | runs-on: ubuntu-latest | |
409 | needs: [create_release, build_unix, build_windows, build_windows32, build_macos, build_macos_legacy] | |
410 | ||
411 | steps: | |
412 | - name: Make SHA2-SUMS files | |
413 | run: | | |
414 | echo "${{ needs.build_unix.outputs.sha256_bin }} yt-dlp" >> SHA2-256SUMS | |
415 | echo "${{ needs.build_unix.outputs.sha256_tar }} yt-dlp.tar.gz" >> SHA2-256SUMS | |
416 | echo "${{ needs.build_unix.outputs.sha256_linux }} yt-dlp_linux" >> SHA2-256SUMS | |
417 | echo "${{ needs.build_unix.outputs.sha256_linux_zip }} yt-dlp_linux.zip" >> SHA2-256SUMS | |
418 | echo "${{ needs.build_windows.outputs.sha256_win }} yt-dlp.exe" >> SHA2-256SUMS | |
419 | echo "${{ needs.build_windows.outputs.sha256_py2exe }} yt-dlp_min.exe" >> SHA2-256SUMS | |
420 | echo "${{ needs.build_windows32.outputs.sha256_win32 }} yt-dlp_x86.exe" >> SHA2-256SUMS | |
421 | echo "${{ needs.build_windows.outputs.sha256_win_zip }} yt-dlp_win.zip" >> SHA2-256SUMS | |
422 | echo "${{ needs.build_macos.outputs.sha256_macos }} yt-dlp_macos" >> SHA2-256SUMS | |
423 | echo "${{ needs.build_macos.outputs.sha256_macos_zip }} yt-dlp_macos.zip" >> SHA2-256SUMS | |
424 | echo "${{ needs.build_macos_legacy.outputs.sha256_macos_legacy }} yt-dlp_macos_legacy" >> SHA2-256SUMS | |
425 | echo "${{ needs.build_unix.outputs.sha512_bin }} yt-dlp" >> SHA2-512SUMS | |
426 | echo "${{ needs.build_unix.outputs.sha512_tar }} yt-dlp.tar.gz" >> SHA2-512SUMS | |
427 | echo "${{ needs.build_unix.outputs.sha512_linux }} yt-dlp_linux" >> SHA2-512SUMS | |
428 | echo "${{ needs.build_unix.outputs.sha512_linux_zip }} yt-dlp_linux.zip" >> SHA2-512SUMS | |
429 | echo "${{ needs.build_windows.outputs.sha512_win }} yt-dlp.exe" >> SHA2-512SUMS | |
430 | echo "${{ needs.build_windows.outputs.sha512_py2exe }} yt-dlp_min.exe" >> SHA2-512SUMS | |
431 | echo "${{ needs.build_windows32.outputs.sha512_win32 }} yt-dlp_x86.exe" >> SHA2-512SUMS | |
432 | echo "${{ needs.build_windows.outputs.sha512_win_zip }} yt-dlp_win.zip" >> SHA2-512SUMS | |
433 | echo "${{ needs.build_macos.outputs.sha512_macos }} yt-dlp_macos" >> SHA2-512SUMS | |
434 | echo "${{ needs.build_macos.outputs.sha512_macos_zip }} yt-dlp_macos.zip" >> SHA2-512SUMS | |
435 | echo "${{ needs.build_macos_legacy.outputs.sha512_macos_legacy }} yt-dlp_macos_legacy" >> SHA2-512SUMS | |
436 | ||
437 | - name: Upload SHA2-256SUMS file | |
438 | uses: actions/upload-release-asset@v1 | |
439 | env: | |
440 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
441 | with: | |
442 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
443 | asset_path: ./SHA2-256SUMS | |
444 | asset_name: SHA2-256SUMS | |
445 | asset_content_type: text/plain | |
446 | - name: Upload SHA2-512SUMS file | |
447 | uses: actions/upload-release-asset@v1 | |
448 | env: | |
449 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
450 | with: | |
451 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
452 | asset_path: ./SHA2-512SUMS | |
453 | asset_name: SHA2-512SUMS | |
454 | asset_content_type: text/plain | |
455 | ||
456 | - name: Make Update spec | |
457 | run: | | |
458 | echo "# This file is used for regulating self-update" >> _update_spec | |
459 | echo "lock 2022.07.18 .+ Python 3.6" >> _update_spec | |
460 | - name: Upload update spec | |
461 | uses: actions/upload-release-asset@v1 | |
462 | env: | |
463 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
464 | with: | |
465 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
466 | asset_path: ./_update_spec | |
467 | asset_name: _update_spec | |
468 | asset_content_type: text/plain | |
469 | ||
470 | - name: Finalize release | |
471 | env: | |
472 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
473 | run: | | |
474 | gh api -X PATCH -H "Accept: application/vnd.github.v3+json" \ | |
475 | /repos/${{ github.repository }}/releases/${{ needs.create_release.outputs.release_id }} \ | |
476 | -F draft=false |