Fix build.yml hashing and crypto support (#87)

Authored-by: shirtjs <2660574+shirtjs@users.noreply.github.com>
This commit is contained in:
shirt-dev 2021-02-15 14:16:23 -05:00 committed by GitHub
parent 1de75fa129
commit 47930b73a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 11 deletions

View File

@ -55,9 +55,7 @@ jobs:
asset_content_type: application/octet-stream
- name: Get SHA2-256SUMS for youtube-dlc
id: sha2_file
env:
SHA2: ${{ hashFiles('youtube-dlc') }}
run: echo "::set-output name=sha2_unix::$SHA2"
run: echo "::set-output name=sha2_unix::$(sha256sum youtube-dlc)"
- name: Install dependencies for pypi
run: |
python -m pip install --upgrade pip
@ -75,6 +73,9 @@ jobs:
runs-on: windows-latest
outputs:
sha2_windows: ${{ steps.sha2_file_win.outputs.sha2_windows }}
needs: build_unix
steps:
@ -104,14 +105,15 @@ jobs:
asset_content_type: application/vnd.microsoft.portable-executable
- name: Get SHA2-256SUMS for youtube-dlc.exe
id: sha2_file_win
env:
SHA2_win: ${{ hashFiles('dist/youtube-dlc.exe') }}
run: echo "::set-output name=sha2_windows::$SHA2_win"
run: echo "::set-output name=sha2_windows::$(certUtil -hashfile dist\youtube-dlc.exe SHA256 | findstr -v :)"
build_windows32:
runs-on: windows-latest
outputs:
sha2_windows32: ${{ steps.sha2_file_win32.outputs.sha2_windows32 }}
needs: [build_unix, build_windows]
steps:
@ -121,8 +123,10 @@ jobs:
with:
python-version: '3.4.4'
architecture: 'x86'
- name: Install VS libs
run: choco install vcexpress2010
- name: Install Requirements for 32 Bit
run: pip install pyinstaller==3.5 mutagen Crypto
run: pip install pyinstaller==3.5 mutagen pycryptodome
- name: Bump version
id: bump_version
run: python devscripts/update-version.py
@ -142,9 +146,7 @@ jobs:
asset_content_type: application/vnd.microsoft.portable-executable
- name: Get SHA2-256SUMS for youtube-dlc_x86.exe
id: sha2_file_win32
env:
SHA2_win32: ${{ hashFiles('dist/youtube-dlc_x86.exe') }}
run: echo "::set-output name=sha2_windows32::$SHA2_win32"
run: echo "::set-output name=sha2_windows32::$(certUtil -hashfile dist\youtube-dlc_x86.exe SHA256 | findstr -v :)"
- name: Make SHA2-256SUMS file
env:
SHA2_WINDOWS: ${{ needs.build_windows.outputs.sha2_windows }}

View File

@ -72,7 +72,7 @@
'--exclude-module=test',
'--exclude-module=ytdlp_plugins',
'--hidden-import=mutagen',
'--hidden-import=%s' % ('Crypto' if _x86 else 'pycryptodome'),
'--hidden-import=pycryptodome',
'youtube_dlc/__main__.py',
])
SetVersion('dist/youtube-dlc%s.exe' % _x86, VERSION_FILE)