fix: build on windows #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build ffsubsync Executables | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
fail-fast: false | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
cache: 'pip' | |
- run: pip install -r requirements.txt | |
- if: matrix.os != 'macos-latest' | |
name: Install UPX | |
uses: crazy-max/ghaction-upx@v3 | |
with: | |
install-only: true | |
- name: Download ffmpeg | |
run: python ffmpeg_download.py | |
shell: bash | |
- if: matrix.os == 'windows-latest' | |
name: Path for windows | |
run: | | |
rm -f "$Python_ROOT_DIR/lib/site-packages/_pyinstaller_hooks_contrib/stdhooks/hook-webrtcvad.py" | |
shell: bash | |
- name: Build executable | |
run: pyinstaller --clean -y --dist ./dist/ffsubsync_bin *.spec | |
shell: bash | |
- name: Archive the build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ffsubsync_bin-${{ matrix.os }} | |
path: | | |
dist/ffsubsync_bin |