]>
Commit | Line | Data |
---|---|---|
915f2a92 | 1 | name: Build |
75b725a7 | 2 | on: workflow_dispatch |
915f2a92 U |
3 | |
4 | jobs: | |
b5899f4f | 5 | create_release: |
915f2a92 | 6 | runs-on: ubuntu-latest |
915f2a92 | 7 | outputs: |
75b725a7 | 8 | version_suffix: ${{ steps.version_suffix.outputs.version_suffix }} |
7a5c1cfe | 9 | ytdlp_version: ${{ steps.bump_version.outputs.ytdlp_version }} |
915f2a92 | 10 | upload_url: ${{ steps.create_release.outputs.upload_url }} |
c2c8921b | 11 | release_id: ${{ steps.create_release.outputs.id }} |
915f2a92 U |
12 | steps: |
13 | - uses: actions/checkout@v2 | |
4c88ff87 | 14 | with: |
15 | fetch-depth: 0 | |
b5899f4f | 16 | - uses: actions/setup-python@v2 |
915f2a92 | 17 | with: |
b5899f4f | 18 | python-version: '3.10' |
19 | ||
75b725a7 | 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") | |
915f2a92 U |
26 | - name: Bump version |
27 | id: bump_version | |
4c88ff87 | 28 | run: | |
75b725a7 | 29 | python devscripts/update-version.py ${{ steps.version_suffix.outputs.version_suffix }} |
4c88ff87 | 30 | make issuetemplates |
b5899f4f | 31 | |
75b725a7 | 32 | - name: Push to release |
885fe351 | 33 | id: push_release |
4c88ff87 | 34 | run: | |
75b725a7 | 35 | git config --global user.name github-actions |
36 | git config --global user.email github-actions@example.com | |
4c88ff87 | 37 | git add -u |
b5899f4f | 38 | git commit -m "[version] update" -m "Created by: ${{ github.event.sender.login }}" -m ":ci skip all :ci run dl" |
75b725a7 | 39 | git push origin --force ${{ github.event.ref }}:release |
4c88ff87 | 40 | echo ::set-output name=head_sha::$(git rev-parse HEAD) |
75b725a7 | 41 | - name: Update master |
75b725a7 | 42 | env: |
43 | PUSH_VERSION_COMMIT: ${{ secrets.PUSH_VERSION_COMMIT }} | |
44 | if: "env.PUSH_VERSION_COMMIT != ''" | |
45 | run: git push origin ${{ github.event.ref }} | |
4c88ff87 | 46 | - name: Get Changelog |
4c88ff87 | 47 | run: | |
64fa820c | 48 | changelog=$(grep -oPz '(?s)(?<=### ${{ steps.bump_version.outputs.ytdlp_version }}\n{2}).+?(?=\n{2,3}###)' Changelog.md) || true |
4c88ff87 | 49 | echo "changelog<<EOF" >> $GITHUB_ENV |
50 | echo "$changelog" >> $GITHUB_ENV | |
51 | echo "EOF" >> $GITHUB_ENV | |
6e21fdd2 | 52 | |
915f2a92 U |
53 | - name: Create Release |
54 | id: create_release | |
55 | uses: actions/create-release@v1 | |
56 | env: | |
57 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
58 | with: | |
7a5c1cfe P |
59 | tag_name: ${{ steps.bump_version.outputs.ytdlp_version }} |
60 | release_name: yt-dlp ${{ steps.bump_version.outputs.ytdlp_version }} | |
a804f6d8 | 61 | commitish: ${{ steps.push_release.outputs.head_sha }} |
c2c8921b | 62 | draft: true |
63 | prerelease: false | |
915f2a92 | 64 | body: | |
0930b11f | 65 | #### [A description of the various files]((https://github.com/yt-dlp/yt-dlp#release-files)) are in the README |
49a57e70 | 66 | |
67 | --- | |
c2c8921b | 68 | <details open><summary><h3>Changelog</summary> |
69 | <p> | |
49a57e70 | 70 | |
0930b11f | 71 | ${{ env.changelog }} |
c2c8921b | 72 | |
73 | </p> | |
74 | </details> | |
b5899f4f | 75 | |
76 | ||
77 | build_unix: | |
78 | needs: create_release | |
e4afcfde | 79 | runs-on: ubuntu-18.04 # Standalone executable should be built on minimum supported OS |
b5899f4f | 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 }} | |
e4afcfde | 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 }} | |
b5899f4f | 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 | |
e4afcfde | 105 | - name: Build Unix executables |
b5899f4f | 106 | run: | |
107 | make all tar | |
e4afcfde | 108 | python pyinst.py --onedir |
109 | (cd ./dist/yt-dlp_linux && zip -r ../yt-dlp_linux.zip .) | |
110 | python pyinst.py | |
b5899f4f | 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}')" | |
e4afcfde | 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}')" | |
b5899f4f | 122 | |
123 | - name: Upload zip binary | |
915f2a92 U |
124 | uses: actions/upload-release-asset@v1 |
125 | env: | |
126 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
127 | with: | |
b5899f4f | 128 | upload_url: ${{ needs.create_release.outputs.upload_url }} |
7a5c1cfe P |
129 | asset_path: ./yt-dlp |
130 | asset_name: yt-dlp | |
915f2a92 | 131 | asset_content_type: application/octet-stream |
ed64ce59 | 132 | - name: Upload Source tar |
133 | uses: actions/upload-release-asset@v1 | |
134 | env: | |
135 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
136 | with: | |
b5899f4f | 137 | upload_url: ${{ needs.create_release.outputs.upload_url }} |
ed64ce59 | 138 | asset_path: ./yt-dlp.tar.gz |
139 | asset_name: yt-dlp.tar.gz | |
140 | asset_content_type: application/gzip | |
e4afcfde | 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 | |
915f2a92 | 159 | |
b5899f4f | 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/ | |
1ed70fd0 | 183 | python devscripts/update-formulae.py taps/Formula/yt-dlp.rb "${{ needs.create_release.outputs.ytdlp_version }}" |
b5899f4f | 184 | git -C taps/ config user.name github-actions |
185 | git -C taps/ config user.email github-actions@example.com | |
1ed70fd0 | 186 | git -C taps/ commit -am 'yt-dlp: ${{ needs.create_release.outputs.ytdlp_version }}' |
b5899f4f | 187 | git -C taps/ push |
188 | ||
189 | ||
0e5927ee R |
190 | build_macos: |
191 | runs-on: macos-11 | |
b5899f4f | 192 | needs: create_release |
0e5927ee | 193 | outputs: |
b5899f4f | 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 }} | |
0e5927ee R |
198 | |
199 | steps: | |
200 | - uses: actions/checkout@v2 | |
b5899f4f | 201 | # NB: In order to create a universal2 application, the version of python3 in /usr/bin has to be used |
0e5927ee R |
202 | - name: Install Requirements |
203 | run: | | |
204 | brew install coreutils | |
b5899f4f | 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 | |
0e5927ee R |
225 | uses: actions/upload-release-asset@v1 |
226 | env: | |
227 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
228 | with: | |
b5899f4f | 229 | upload_url: ${{ needs.create_release.outputs.upload_url }} |
0e5927ee R |
230 | asset_path: ./dist/yt-dlp_macos |
231 | asset_name: yt-dlp_macos | |
232 | asset_content_type: application/octet-stream | |
b5899f4f | 233 | - name: Upload onedir binary |
0e5927ee R |
234 | uses: actions/upload-release-asset@v1 |
235 | env: | |
236 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
237 | with: | |
b5899f4f | 238 | upload_url: ${{ needs.create_release.outputs.upload_url }} |
0e5927ee R |
239 | asset_path: ./dist/yt-dlp_macos.zip |
240 | asset_name: yt-dlp_macos.zip | |
241 | asset_content_type: application/zip | |
b5899f4f | 242 | |
0e5927ee | 243 | |
6d916fe7 SL |
244 | build_macos_legacy: |
245 | runs-on: macos-latest | |
246 | needs: create_release | |
28cdb605 | 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 | ||
6d916fe7 SL |
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 | ||
7e8772bf | 294 | build_windows: |
915f2a92 | 295 | runs-on: windows-latest |
b5899f4f | 296 | needs: create_release |
47930b73 | 297 | outputs: |
b5899f4f | 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 }} | |
47930b73 | 304 | |
915f2a92 U |
305 | steps: |
306 | - uses: actions/checkout@v2 | |
b5899f4f | 307 | - uses: actions/setup-python@v2 |
308 | with: # 3.8 is used for Win7 support | |
da8fb75d | 309 | python-version: '3.8' |
915f2a92 | 310 | - name: Install Requirements |
b5899f4f | 311 | run: | # Custom pyinstaller built with https://github.com/yt-dlp/pyinstaller-builds |
386cdfdb | 312 | python -m pip install --upgrade pip setuptools wheel py2exe |
b46ccbc6 | 313 | pip install "https://yt-dlp.github.io/Pyinstaller-Builds/x86_64/pyinstaller-4.10-py3-none-any.whl" -r requirements.txt |
b5899f4f | 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 | |
75b725a7 | 338 | env: |
b5899f4f | 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 | |
915f2a92 U |
346 | uses: actions/upload-release-asset@v1 |
347 | env: | |
348 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
349 | with: | |
b5899f4f | 350 | upload_url: ${{ needs.create_release.outputs.upload_url }} |
7a5c1cfe P |
351 | asset_path: ./dist/yt-dlp.exe |
352 | asset_name: yt-dlp.exe | |
98918847 | 353 | asset_content_type: application/vnd.microsoft.portable-executable |
b5899f4f | 354 | - name: Upload onedir binary |
4c88ff87 | 355 | uses: actions/upload-release-asset@v1 |
356 | env: | |
357 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
358 | with: | |
b5899f4f | 359 | upload_url: ${{ needs.create_release.outputs.upload_url }} |
0e5927ee R |
360 | asset_path: ./dist/yt-dlp_win.zip |
361 | asset_name: yt-dlp_win.zip | |
4c88ff87 | 362 | asset_content_type: application/zip |
b5899f4f | 363 | |
386cdfdb | 364 | |
915f2a92 | 365 | build_windows32: |
915f2a92 | 366 | runs-on: windows-latest |
b5899f4f | 367 | needs: create_release |
47930b73 | 368 | outputs: |
b5899f4f | 369 | sha256_win32: ${{ steps.get_sha.outputs.sha256_win32 }} |
370 | sha512_win32: ${{ steps.get_sha.outputs.sha512_win32 }} | |
47930b73 | 371 | |
915f2a92 U |
372 | steps: |
373 | - uses: actions/checkout@v2 | |
b5899f4f | 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 | |
0181adef | 376 | python-version: '3.7' |
915f2a92 | 377 | architecture: 'x86' |
0181adef | 378 | - name: Install Requirements |
0e5927ee R |
379 | run: | |
380 | python -m pip install --upgrade pip setuptools wheel | |
b46ccbc6 | 381 | pip install "https://yt-dlp.github.io/Pyinstaller-Builds/i686/pyinstaller-4.10-py3-none-any.whl" -r requirements.txt |
b5899f4f | 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 | |
915f2a92 U |
397 | uses: actions/upload-release-asset@v1 |
398 | env: | |
399 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
400 | with: | |
b5899f4f | 401 | upload_url: ${{ needs.create_release.outputs.upload_url }} |
7a5c1cfe P |
402 | asset_path: ./dist/yt-dlp_x86.exe |
403 | asset_name: yt-dlp_x86.exe | |
98918847 | 404 | asset_content_type: application/vnd.microsoft.portable-executable |
b5899f4f | 405 | |
14b17a55 | 406 | |
407 | finish: | |
408 | runs-on: ubuntu-latest | |
6d916fe7 | 409 | needs: [create_release, build_unix, build_windows, build_windows32, build_macos, build_macos_legacy] |
14b17a55 | 410 | |
411 | steps: | |
b5899f4f | 412 | - name: Make SHA2-SUMS files |
915f2a92 | 413 | run: | |
b5899f4f | 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 | |
e4afcfde | 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 | |
b5899f4f | 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 | |
6d916fe7 | 424 | echo "${{ needs.build_macos_legacy.outputs.sha256_macos_legacy }} yt-dlp_macos_legacy" >> SHA2-256SUMS |
b5899f4f | 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 | |
e4afcfde | 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 | |
b5899f4f | 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 | |
6d916fe7 | 435 | echo "${{ needs.build_macos_legacy.outputs.sha512_macos_legacy }} yt-dlp_macos_legacy" >> SHA2-512SUMS |
b5899f4f | 436 | |
437 | - name: Upload SHA2-256SUMS file | |
da6403d3 TOH |
438 | uses: actions/upload-release-asset@v1 |
439 | env: | |
440 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
441 | with: | |
b5899f4f | 442 | upload_url: ${{ needs.create_release.outputs.upload_url }} |
da6403d3 TOH |
443 | asset_path: ./SHA2-256SUMS |
444 | asset_name: SHA2-256SUMS | |
445 | asset_content_type: text/plain | |
b5899f4f | 446 | - name: Upload SHA2-512SUMS file |
beb982be NA |
447 | uses: actions/upload-release-asset@v1 |
448 | env: | |
449 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
450 | with: | |
b5899f4f | 451 | upload_url: ${{ needs.create_release.outputs.upload_url }} |
beb982be NA |
452 | asset_path: ./SHA2-512SUMS |
453 | asset_name: SHA2-512SUMS | |
454 | asset_content_type: text/plain | |
c2c8921b | 455 | |
b1f94422 | 456 | - name: Make Update spec |
457 | run: | | |
458 | echo "# This file is used for regulating self-update" >> _update_spec | |
459 | - name: Upload update spec | |
460 | uses: actions/upload-release-asset@v1 | |
461 | env: | |
462 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
463 | with: | |
464 | upload_url: ${{ needs.create_release.outputs.upload_url }} | |
465 | asset_path: ./_update_spec | |
466 | asset_name: _update_spec | |
467 | asset_content_type: text/plain | |
468 | ||
c2c8921b | 469 | - name: Finalize release |
470 | env: | |
471 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
472 | run: | | |
473 | gh api -X PATCH -H "Accept: application/vnd.github.v3+json" \ | |
474 | /repos/${{ github.repository }}/releases/${{ needs.create_release.outputs.release_id }} \ | |
475 | -F draft=false |