-
Notifications
You must be signed in to change notification settings - Fork 29
102 lines (99 loc) · 3.18 KB
/
cd-windows.yaml
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
name: Continuous delivery - Windows
on:
push:
env:
FLIT_ROOT_INSTALL: 1
jobs:
build-onedir:
name: Build onedir
runs-on: windows-latest
needs: version-check
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create virtual environment
run: |
python -m venv venv
.\venv\Scripts\Activate.ps1
.\venv\Scripts\pip install pip
.\venv\Scripts\pip install flit
.\venv\Scripts\flit install --symlink
- name: Create Windows version info file
run: |
.\venv\Scripts\Activate.ps1
create-version-file `
--outfile .\ci-scripts\windows\pyinstaller\file_version_info.txt `
--version "$(Get-Content .\pynitrokey\VERSION)" `
.\ci-scripts\windows\pyinstaller\file_version_info_metadata.yaml
- name: Build onedir
run: |
.\venv\Scripts\Activate.ps1
pyinstaller ci-scripts/windows/pyinstaller/pynitrokey-onedir.spec
build-onefile:
name: Build onefile
runs-on: windows-latest
needs: version-check
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create virtual environment
run: |
python -m venv venv
.\venv\Scripts\Activate.ps1
.\venv\Scripts\pip install pip
.\venv\Scripts\pip install flit
.\venv\Scripts\flit install --symlink
- name: Create Windows version info file
run: |
.\venv\Scripts\Activate.ps1
create-version-file `
--outfile .\ci-scripts\windows\pyinstaller\file_version_info.txt `
--version "$(Get-Content .\pynitrokey\VERSION)" `
.\ci-scripts\windows\pyinstaller\file_version_info_metadata.yaml
- name: Build onefile
run: |
.\venv\Scripts\Activate.ps1
pyinstaller ci-scripts/windows/pyinstaller/pynitrokey-onefile.spec
build-msi-installer:
name: Build MSI installer
runs-on: windows-latest
needs: build-onedir
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: pynitrokey-onedir
path: dist/nitropy
- name: Create sources file
run: |
$Env:Path += ";" + "$Env:WIX" + "bin"
heat `
dir .\dist\nitropy\ `
-dr INSTALLFOLDER `
-ag `
-cg ApplicationFilesDynamic `
-ke `
-srd -sfrag -suid -sreg `
-nologo `
-pog:Binaries `
-pog:Documents `
-pog:Satellites `
-pog:Sources `
-pog:Content `
-o Sources.wxs
- name: Build object files
run: |
$Env:Path += ";" + "$Env:WIX" + "bin"
candle .\ci-scripts\windows\wix\Product.wxs -o Product.wixobj
candle .\Sources.wxs -o .\Sources.wixobj
- name: Build installer package
run: |
$Env:Path += ";" + "$Env:WIX" + "bin"
light `
-b .\dist\nitropy\ `
-sice:ICE80 `
.\Product.wixobj `
.\Sources.wixobj `
-o nitropy.msi