Skip to content

chore(release): 1.9.0rc2 #18

chore(release): 1.9.0rc2

chore(release): 1.9.0rc2 #18

Workflow file for this run

name: Build Windows MSI
on:
workflow_dispatch:
push:
tags:
- v*
jobs:
build-windows-msi:
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 #v6.2.0
with:
python-version: '3.9'
cache: 'pip'
cache-dependency-path: |
requirements.txt
requirements-windows.txt
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-windows.txt
python -m pip install pyinstaller
- name: Fetch custom PyWebIO fork
shell: pwsh
run: |
if (Test-Path ..\PyWebIO) { Remove-Item -Path ..\PyWebIO -Recurse -Force }
git clone https://github.com/mhucka/PyWebIO.git ..\PyWebIO
git -C ..\PyWebIO checkout 2af53fc
- name: Install custom PyWebIO fork
run: |
python -m pip install ..\PyWebIO
- name: Generate Windows build metadata
run: |
python dev/installers/windows/create-version.py
python dev/installers/windows/create-wix-script.py
- name: Build executable with PyInstaller
run: |
python -m PyInstaller --distpath dist/win --clean --noconfirm pyinstaller-win32.spec
- name: Install WiX Toolset
shell: pwsh
run: |
choco install wixtoolset --no-progress -y
- name: Set MSI version variable
shell: pwsh
run: |
$version = (Select-String -Path setup.cfg -Pattern '^version\s*=\s*(.+)$').Matches[0].Groups[1].Value.Trim()
"FOLIAGE_VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Build MSI with WiX
shell: pwsh
run: |
candle -nologo -out dist\win\ dev\installers\windows\Product.wxs
light -nologo -out dist\win\foliage_${env:FOLIAGE_VERSION}_windows_x64.msi dist\win\Product.wixobj
- name: Upload MSI artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
with:
archive: false
path: dist/win/foliage_*.msi
if-no-files-found: error