From ed5d3eba548496733a23f96760ea5e3b330c2c1b Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Fri, 26 Feb 2021 20:16:48 +0100 Subject: [PATCH] Actions: implement windows job --- .github/workflows/build.yml | 57 +++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0413eb8..6cf9e4f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,6 +2,63 @@ name: Build on: push jobs: + windows: + name: Build for Windows + runs-on: windows-2019 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: Check Python install + run: | + which python + python --version + python -c "import struct; print(struct.calcsize('P') * 8)" + which pip + pip --version + + - name: Install Python dependencies + run: | + pip3 install -U setuptools wheel pip + pip3 install pywin32 twisted[tls] certifi + pip3 install shiboken2 pyside2 + pip3 install py2exe + + - name: Check Python dependencies + run: | + python3 -c "from PySide2 import __version__; print(__version__)" + python3 -c "from PySide2.QtCore import __version__; print(__version__)" + python3 -c "from PySide2.QtCore import QLibraryInfo; print(QLibraryInfo.location(QLibraryInfo.LibrariesPath))" + + - name: Build + run: | + $ver = (findstr __version__ .\syncplay\__init__.py).split("'")[1] + echo $ver + echo "VER=$ver" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + python buildPy2exe.py + type nul > syncplay_v$ver\syncplay.ini + + - name: Prepare for deployment + run: dir + + - name: Deploy portable + uses: actions/upload-artifact@v2 + with: + name: Syncplay_${{ env.VER }}_Portable + path: | + syncplay_v${{ env.VER }} + + - name: Deploy installer + uses: actions/upload-artifact@v2 + with: + name: Syncplay-${{ env.VER }}-Setup.exe + path: | + Syncplay-${{ env.VER }}-Setup.exe # macos: # name: Build for macOS