10 runs-on: ubuntu-latest
13 ytdlp_version: ${{ steps.bump_version.outputs.ytdlp_version }}
14 upload_url: ${{ steps.create_release.outputs.upload_url }}
15 sha2_unix: ${{ steps.sha2_file.outputs.sha2_unix }}
18 - uses: actions/checkout@v2
20 uses: actions/setup-python@v2
23 - name: Install packages
24 run: sudo apt-get -y install zip pandoc man
27 run: python devscripts/update-version.py
29 run: echo "${{ steps.bump_version.outputs.ytdlp_version }}"
32 - name: Create Release
34 uses: actions/create-release@v1
36 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 tag_name: ${{ steps.bump_version.outputs.ytdlp_version }}
39 release_name: yt-dlp ${{ steps.bump_version.outputs.ytdlp_version }}
45 - name: Upload yt-dlp Unix binary
46 id: upload-release-asset
47 uses: actions/upload-release-asset@v1
49 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51 upload_url: ${{ steps.create_release.outputs.upload_url }}
54 asset_content_type: application/octet-stream
55 - name: Get SHA2-256SUMS for yt-dlp
57 run: echo "::set-output name=sha2_unix::$(sha256sum yt-dlp | awk '{print $1}')"
58 - name: Install dependencies for pypi
60 PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
61 if: "env.PYPI_TOKEN != ''"
63 python -m pip install --upgrade pip
64 pip install setuptools wheel twine
65 - name: Build and publish on pypi
67 TWINE_USERNAME: __token__
68 TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
69 if: "env.TWINE_PASSWORD != ''"
72 python setup.py sdist bdist_wheel
76 runs-on: windows-latest
80 sha2_windows: ${{ steps.sha2_file_win.outputs.sha2_windows }}
83 - uses: actions/checkout@v2
85 uses: actions/setup-python@v2
88 - name: Upgrade pip and enable wheel support
89 run: python -m pip install --upgrade pip setuptools wheel
90 - name: Install Requirements
91 run: pip install pyinstaller mutagen pycryptodome
94 run: python devscripts/update-version.py
96 run: echo "${{ steps.bump_version.outputs.ytdlp_version }}"
97 - name: Run PyInstaller Script
98 run: python pyinst.py 64
99 - name: Upload yt-dlp.exe Windows binary
100 id: upload-release-windows
101 uses: actions/upload-release-asset@v1
103 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105 upload_url: ${{ needs.build_unix.outputs.upload_url }}
106 asset_path: ./dist/yt-dlp.exe
107 asset_name: yt-dlp.exe
108 asset_content_type: application/vnd.microsoft.portable-executable
109 - name: Get SHA2-256SUMS for yt-dlp.exe
111 run: echo "::set-output name=sha2_windows::$((Get-FileHash dist\yt-dlp.exe -Algorithm SHA256).Hash.ToLower())"
114 runs-on: windows-latest
115 needs: [build_unix, build_windows]
118 sha2_windows32: ${{ steps.sha2_file_win32.outputs.sha2_windows32 }}
121 - uses: actions/checkout@v2
122 - name: Set up Python 3.4.4 32-Bit
123 uses: actions/setup-python@v2
125 python-version: '3.4.4'
127 - name: Upgrade pip and enable wheel support
128 run: python -m pip install pip==19.1.1 setuptools==43.0.0 wheel==0.33.6
129 - name: Install Requirements for 32 Bit
130 run: pip install pyinstaller==3.5 mutagen==1.42.0 pycryptodome==3.9.4 pefile==2019.4.18
133 run: python devscripts/update-version.py
134 - name: Print version
135 run: echo "${{ steps.bump_version.outputs.ytdlp_version }}"
136 - name: Run PyInstaller Script for 32 Bit
137 run: python pyinst.py 32
138 - name: Upload Executable yt-dlp_x86.exe
139 id: upload-release-windows32
140 uses: actions/upload-release-asset@v1
142 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144 upload_url: ${{ needs.build_unix.outputs.upload_url }}
145 asset_path: ./dist/yt-dlp_x86.exe
146 asset_name: yt-dlp_x86.exe
147 asset_content_type: application/vnd.microsoft.portable-executable
148 - name: Get SHA2-256SUMS for yt-dlp_x86.exe
150 run: echo "::set-output name=sha2_windows32::$((Get-FileHash dist\yt-dlp_x86.exe -Algorithm SHA256).Hash.ToLower())"
153 runs-on: ubuntu-latest
154 needs: [build_unix, build_windows, build_windows32]
157 - name: Make SHA2-256SUMS file
159 SHA2_WINDOWS: ${{ needs.build_windows.outputs.sha2_windows }}
160 SHA2_WINDOWS32: ${{ needs.build_windows32.outputs.sha2_windows32 }}
161 SHA2_UNIX: ${{ needs.build_unix.outputs.sha2_unix }}
162 YTDLP_VERSION: ${{ needs.build_unix.outputs.ytdlp_version }}
164 echo "version:${env:YTDLP_VERSION}" >> SHA2-256SUMS
165 echo "yt-dlp.exe:${env:SHA2_WINDOWS}" >> SHA2-256SUMS
166 echo "yt-dlp_x86.exe:${env:SHA2_WINDOWS32}" >> SHA2-256SUMS
167 echo "yt-dlp:${env:SHA2_UNIX}" >> SHA2-256SUMS
168 - name: Upload 256SUMS file
170 uses: actions/upload-release-asset@v1
172 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
174 upload_url: ${{ needs.build_unix.outputs.upload_url }}
175 asset_path: ./SHA2-256SUMS
176 asset_name: SHA2-256SUMS
177 asset_content_type: text/plain