-
Notifications
You must be signed in to change notification settings - Fork 10
121 lines (106 loc) · 3.23 KB
/
build_installer_windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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