Skip to content

Windows Installer Build Workflow #34

Windows Installer Build Workflow

Windows Installer Build Workflow #34

name: Windows Installer Build Workflow
on:
workflow_dispatch:
jobs:
create_branch:
name: Create Branch on Remote
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: Create Branch
run: |
git checkout -b build_branch dev
git push origin build_branch
Windows_Python_Build:
name: Windows Python Binary Build
needs: [create_branch]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: build_branch
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip' # caching pip dependencies
- run: |
pip install -r pdf_generator/requirements.txt
./build_python_win.bat
git config user.name github-actions
git config user.email [email protected]
git pull
git add EHSA_V3/
git commit -m "generated pdfgen exe"
git pull --no-edit
git push
git push -f origin build_branch
Windows_Rust_Build:
name: Windows Rust Binary Build
needs: [create_branch]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: build_branch
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: |
./build_rust_release.bat
git config user.name github-actions
git config user.email [email protected]
git pull
git add EHSA_V3/
git commit -m "generated rust allocator exe"
git pull --no-edit
git push
git push -f origin build_branch
Windows_Flutter_Build:
name: Windows Flutter Binary Build
needs: [create_branch]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: build_branch
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: |
./build_flutter_win.bat
git config user.name github-actions
git config user.email [email protected]
git pull
git add EHSA_V3/
git commit -m "generated flutter windows build"
git pull --no-edit
git push
git push -f origin build_branch
Installer_Build:
name: Installer Build
needs: [Windows_Python_Build,Windows_Rust_Build,Windows_Flutter_Build]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: build_branch
- name: Install NSIS
run: |
Invoke-WebRequest -Uri https://raw.githubusercontent.com/actions/runner-images/main/images/win/scripts/Installers/Install-NSIS.ps1 -OutFile Install-NSIS.ps1
.\Install-NSIS.ps1 -Version "3.06.1"
- name: Build installer
run: |
& 'C:\Program Files (x86)\NSIS\makensis.exe' nsis_script.nsi
- name: Upload installer artifact
uses: actions/upload-artifact@v2
with:
name: EHSA Installer
path: ehsa_installer.exe
- name: Delete branch
run: |
git checkout dev
git branch -d build_branch
git push origin --delete build_branch