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 scripts/update-version-workflow.py
31 - name: Create Release
33 uses: actions/create-release@v1
35 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 tag_name: ${{ steps.dump_version.outputs.ytdlc_version }}
38 release_name: youtube-dlc ${{ steps.dump_version.outputs.ytdlc_version }}
44 - name: Upload youtube-dlc Unix binary
45 id: upload-release-asset
46 uses: actions/upload-release-asset@v1
48 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50 upload_url: ${{ steps.create_release.outputs.upload_url }}
51 asset_path: ./youtube-dlc
52 asset_name: youtube-dlc
53 asset_content_type: application/octet-stream
54 - name: Get SHA2-256SUMS for youtube-dlc
57 SHA2: ${{ hashFiles('youtube-dlc') }}
58 run: echo "::set-output name=sha2_unix::${env:SHA2}"
62 runs-on: windows-latest
67 - uses: actions/checkout@v2
69 uses: actions/setup-python@v2
72 - name: Install Requirements
73 run: pip install pyinstaller
75 run: python scripts/update-version-workflow.py
76 - name: Run PyInstaller Script
78 - name: Upload youtube-dlc.exe Windows binary
79 id: upload-release-windows
80 uses: actions/upload-release-asset@v1
82 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84 upload_url: ${{ needs.build_unix.outputs.upload_url }}
85 asset_path: ./dist/youtube-dlc.exe
86 asset_name: youtube-dlc.exe
87 asset_content_type: application/octet-stream
88 - name: Get SHA2-256SUMS for youtube-dlc.exe
91 SHA2: ${{ hashFiles('dist/youtube-dlc.exe') }}
92 run: echo "::set-output name=sha2_windows::${env:SHA2}"
96 runs-on: windows-latest
101 - uses: actions/checkout@v2
102 - name: Set up Python 3.5.4 32-Bit
103 uses: actions/setup-python@v2
105 python-version: '3.5.4'
107 - name: Install Requirements for 32 Bit
108 run: pip install pyinstaller==3.5
110 run: python scripts/update-version-workflow.py
111 - name: Run PyInstaller Script for 32 Bit
112 run: python pyinst32.py
113 - name: Upload Executable youtube-dlc_x86.exe
114 id: upload-release-windows32
115 uses: actions/upload-release-asset@v1
117 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119 upload_url: ${{ needs.build_unix.outputs.upload_url }}
120 asset_path: ./dist/youtube-dlc_x86.exe
121 asset_name: youtube-dlc_x86.exe
122 asset_content_type: application/octet-stream
123 - name: Get SHA2-256SUMS for youtube-dlc_x86.exe
126 SHA2: ${{ hashFiles('dist/youtube-dlc_x86.exe') }}
127 run: echo "::set-output name=sha2_windows32::${env:SHA2}"
128 - name: Make SHA2-256SUMS file
130 SHA2_WINDOWS: ${{ needs.build_windows.outputs.sha2_windows }}
131 SHA2_WINDOWS32: ${{ steps.sha2_file_win32.outputs.sha2_windows32 }}
132 SHA2_UNIX: ${{ needs.build_unix.outputs.sha2_unix }}
133 YTDLC_VERSION: ${{ needs.build_unix.outputs.ytdlc_version }}
135 echo "$SHA2_WINDOWS youtube-dlc.exe" > SHA2-256SUMS
136 echo "$SHA2_WINDOWS32 youtube-dlc32.exe" > SHA2-256SUMS
137 echo "$SHA2_UNIX youtube-dlc" >> SHA2-256SUMS
141 runs-on: ubuntu-latest
146 - uses: actions/checkout@v2
147 - name: Set up Python
148 uses: actions/setup-python@v2
150 python-version: '3.x'
151 - name: Install dependencies
153 python -m pip install --upgrade pip
154 pip install setuptools wheel twine
156 run: python scripts/update-version-workflow.py
157 - name: Build and publish
159 TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
160 TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
163 python setup.py sdist bdist_wheel