11 runs-on: ubuntu-latest
14 ytdlc_version: ${{ steps.bump_version.outputs.ytdlc_version }}
15 upload_url: ${{ steps.create_release.outputs.upload_url }}
16 sha2_unix: ${{ steps.sha2_file.outputs.sha2_unix }}
19 - uses: actions/checkout@v2
21 uses: actions/setup-python@v2
24 - name: Install packages
25 run: sudo apt-get -y install zip pandoc man
28 run: python devscripts/update-version.py
30 run: echo "${{ steps.bump_version.outputs.ytdlc_version }}"
33 - name: Create Release
35 uses: actions/create-release@v1
37 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39 tag_name: ${{ steps.bump_version.outputs.ytdlc_version }}
40 release_name: yt-dlp ${{ steps.bump_version.outputs.ytdlc_version }}
46 - name: Upload youtube-dlc Unix binary
47 id: upload-release-asset
48 uses: actions/upload-release-asset@v1
50 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52 upload_url: ${{ steps.create_release.outputs.upload_url }}
53 asset_path: ./youtube-dlc
54 asset_name: youtube-dlc
55 asset_content_type: application/octet-stream
56 - name: Get SHA2-256SUMS for youtube-dlc
58 run: echo "::set-output name=sha2_unix::$(sha256sum youtube-dlc | awk '{print $1}')"
59 - name: Install dependencies for pypi
61 python -m pip install --upgrade pip
62 pip install setuptools wheel twine
63 - name: Build and publish on pypi
65 TWINE_USERNAME: __token__
66 TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
69 python setup.py sdist bdist_wheel
74 runs-on: windows-latest
77 sha2_windows: ${{ steps.sha2_file_win.outputs.sha2_windows }}
82 - uses: actions/checkout@v2
84 uses: actions/setup-python@v2
87 - name: Upgrade pip and enable wheel support
88 run: python -m pip install --upgrade pip setuptools wheel
89 - name: Install Requirements
90 run: pip install pyinstaller mutagen pycryptodome
93 run: python devscripts/update-version.py
95 run: echo "${{ steps.bump_version.outputs.ytdlc_version }}"
96 - name: Run PyInstaller Script
97 run: python pyinst.py 64
98 - name: Upload youtube-dlc.exe Windows binary
99 id: upload-release-windows
100 uses: actions/upload-release-asset@v1
102 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104 upload_url: ${{ needs.build_unix.outputs.upload_url }}
105 asset_path: ./dist/youtube-dlc.exe
106 asset_name: youtube-dlc.exe
107 asset_content_type: application/vnd.microsoft.portable-executable
108 - name: Get SHA2-256SUMS for youtube-dlc.exe
110 run: echo "::set-output name=sha2_windows::$((Get-FileHash dist\youtube-dlc.exe -Algorithm SHA256).Hash.ToLower())"
114 runs-on: windows-latest
117 sha2_windows32: ${{ steps.sha2_file_win32.outputs.sha2_windows32 }}
119 needs: [build_unix, build_windows]
122 - uses: actions/checkout@v2
123 - name: Set up Python 3.4.4 32-Bit
124 uses: actions/setup-python@v2
126 python-version: '3.4.4'
128 - name: Upgrade pip and enable wheel support
129 run: python -m pip install pip==19.1.1 setuptools==43.0.0 wheel==0.33.6
130 - name: Install Requirements for 32 Bit
131 run: pip install pyinstaller==3.5 mutagen==1.42.0 pycryptodome==3.9.4
134 run: python devscripts/update-version.py
135 - name: Print version
136 run: echo "${{ steps.bump_version.outputs.ytdlc_version }}"
137 - name: Run PyInstaller Script for 32 Bit
138 run: python pyinst.py 32
139 - name: Upload Executable youtube-dlc_x86.exe
140 id: upload-release-windows32
141 uses: actions/upload-release-asset@v1
143 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
145 upload_url: ${{ needs.build_unix.outputs.upload_url }}
146 asset_path: ./dist/youtube-dlc_x86.exe
147 asset_name: youtube-dlc_x86.exe
148 asset_content_type: application/vnd.microsoft.portable-executable
149 - name: Get SHA2-256SUMS for youtube-dlc_x86.exe
151 run: echo "::set-output name=sha2_windows32::$((Get-FileHash dist\youtube-dlc_x86.exe -Algorithm SHA256).Hash.ToLower())"
152 - name: Make SHA2-256SUMS file
154 SHA2_WINDOWS: ${{ needs.build_windows.outputs.sha2_windows }}
155 SHA2_WINDOWS32: ${{ steps.sha2_file_win32.outputs.sha2_windows32 }}
156 SHA2_UNIX: ${{ needs.build_unix.outputs.sha2_unix }}
157 YTDLC_VERSION: ${{ needs.build_unix.outputs.ytdlc_version }}
159 echo "version:${env:YTDLC_VERSION}" >> SHA2-256SUMS
160 echo "youtube-dlc.exe:${env:SHA2_WINDOWS}" >> SHA2-256SUMS
161 echo "youtube-dlc_x86.exe:${env:SHA2_WINDOWS32}" >> SHA2-256SUMS
162 echo "youtube-dlc:${env:SHA2_UNIX}" >> SHA2-256SUMS
164 - name: Upload 256SUMS file
166 uses: actions/upload-release-asset@v1
168 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
170 upload_url: ${{ needs.build_unix.outputs.upload_url }}
171 asset_path: ./SHA2-256SUMS
172 asset_name: SHA2-256SUMS
173 asset_content_type: text/plain
175 # update_version_badge:
176 # runs-on: ubuntu-latest
179 # - name: Create Version Badge
180 # uses: schneegans/dynamic-badges-action@v1.0.0
182 # auth: ${{ secrets.GIST_TOKEN }}
183 # gistID: c69cb23c3c5b3316248e52022790aa57
184 # filename: version.json
186 # message: ${{ needs.build_unix.outputs.ytdlc_version }}