Merge pull request #1165 from alfar/develop #58
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
# This workflow is used to run the pyinstaller spec | |
# and produce a Windows build directory as artifact. | |
# In the future it'll also need to confirm that all | |
# of the translations and UI files are built from | |
# scratch as a condition of the tests with pytest. | |
name: Build for Windows | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the develop branch | |
push: | |
branches: [ develop ] | |
pull_request: | |
branches: [ develop ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
windows_build: | |
name: Building for Windows ${{ matrix.python_version }} on ${{ matrix.os }} | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: [3.9] | |
os: [windows-latest] | |
steps: | |
# We use the version from this commit and not just the current branch. This is for R&D builds too. | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# These should be moved to a pyproject.toml file down the line. | |
- name: Install Python build dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyqt5==5.15.7 lxml pytest pytest-faulthandler markdown language_tool_python symspellpy pyspellchecker pyenchant | |
pip install pyinstaller | |
- name: pyinstaller build | |
run: | | |
pyinstaller ./manuskript.spec | |
env: | |
manuskript_version: ${{ steps.vars.outputs.sha_short }} | |
- name: Remove W7 File Issues # https://github.com/olivierkes/manuskript/blob/develop/package/build_for_windows.sh#L85 | |
run: | | |
powershell Remove-Item ./dist/manuskript/PyQt5/Qt5/bin/Qt5Bluetooth.dll; | |
powershell Remove-Item ./dist/manuskript/ucrtbase.dll; | |
powershell Remove-Item ./dist/manuskript/api-ms-win-*; | |
# https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: manuskript_windows | |
path: ./dist/manuskript/ |