diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0599ac7a..9fd5a80cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -106,6 +106,8 @@ jobs: build_windows: runs-on: windows-2022 needs: build_unix + env: + PYCRYPTO: pycrypto-2.6.1-cp34-none-win32 outputs: sha256_win: ${{ steps.sha256_win.outputs.sha256_win }} sha512_win: ${{ steps.sha512_win.outputs.sha512_win }} @@ -135,6 +137,23 @@ jobs: echo "Version = $ytdl_version${sha+[ }${sha}${sha+]}" # - name: Run PyInstaller Script # run: python -m PyInstaller --onefile --console --distpath dist/ -n youtube-dl youtube_dl\__main__.py + - name: Cache PyCrypto + id: cache_pc + uses: actions/cache@v3 + with: + key: ${{ env.PYCRYPTO }} + path: ./${{ env.PYCRYPTO }} + - name: Acquire PyCrypto + if: ${{ ! steps.cache_pc.outputs.cache-hit }} + shell: bash + run: | + mkdir -p ./${PYCRYPTO} + cd ${PYCRYPTO} + curl -L -O "https://web.archive.org/web/20200627032153/http://www.voidspace.org.uk/python/pycrypto-2.6.1/pycrypto-2.6.1-cp34-none-win32.whl" + - name: Install PyCrypto + shell: bash + run: | + python -m pip install ./${PYCRYPTO}/${PYCRYPTO}.whl - name: Build EXE file run: python setup.py py2exe - name: Upload youtube-dl.exe Windows binary