-
Notifications
You must be signed in to change notification settings - Fork 123
149 lines (124 loc) · 5.38 KB
/
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Windows build
on:
push:
branches:
- master
- next
- 'next*'
jobs:
qtbuild:
name: Build with Qt
runs-on: windows-latest
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.8.1'
modules: 'qtcharts qtmultimedia qt5compat qtshadertools'
arch: 'win64_mingw'
tools: 'tools_mingw1310'
aqtversion: '==3.1.19' # See https://github.com/jurplel/install-qt-action/issues/270
- name: Checkout
uses: actions/checkout@v4
- run: git fetch --prune --unshallow --tags
- name: Preapre build
run: |
echo "Create a build directory"
md build
cd build
md release
echo "Get all headers and DLLs for the build"
cd ../..
git clone https://github.com/AlbrechtL/welle.io-win-libs.git
- name: Display environment variables
run: |
Get-ChildItem Env:
- name: Build
id: build
run: |
cd build/release
qmake ../..
mingw32-make -j4
- name: Create installer
id: create_installer
run: |
echo "*** Create new folders ***"
New-Item -ItemType directory -Path installer
New-Item -ItemType directory -Path to_publish
New-Item -ItemType directory -Path publish
New-Item -ItemType directory -Path publish_production
echo "*** Copy non QT DLLs from welle.io-win-libs repository ***"
Copy-Item ..\welle.io-win-libs\x64\*.dll installer -recurse # Libs
Copy-Item ..\welle.io-win-libs\x64\*.exe installer -recurse # Microsoft Visual C++ Redistributable
Copy-Item ..\welle.io-win-libs\zadig*.exe installer
echo "*** Copy welle-io binary files ***"
Copy-Item build\release\src\welle-gui\release\welle-io.exe installer
# Deploy QT and related plugins
echo "*** Deploy QT and related plugins ***"
& windeployqt installer\welle-io.exe --qmldir src\welle-gui\QML\ --no-translations
# For some reason windeployqt deploys the wrong DLLs
Copy-Item $Env:QT_ROOT_DIR\bin\libgcc_s_seh-1.dll installer
Copy-Item $Env:QT_ROOT_DIR\bin\libwinpthread-1.dll installer
Copy-Item $Env:QT_ROOT_DIR\bin\libstdc++-6.dll installer
echo ""*** Create filename "***"
$current_date=$(Get-Date -Format 'yyyyMMdd')
$git_hash=$(git -C . rev-parse --short HEAD)
$Filename = $current_date + "_" + $git_hash + "_Windows_welle-io-setup_x64"
echo ""*** Run InnoSetup "***"
& ISCC /Oto_publish\ /F$Filename /DGitHash=$git_hash windows_installer.iss
- name: Archive artifacts (welle.io Windows installer)
id: upload_artifact
uses: actions/upload-artifact@v4
with:
name: welle.io Windows installer
path: to_publish\*.exe
if-no-files-found: error
- name: Sign installer with self-signed certificate with SignPath
id: signing_installer
uses: signpath/github-action-submit-signing-request@v1
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: 'b7a507e8-ab76-445f-bfb5-05944bcbbee9'
project-slug: 'welle.io'
signing-policy-slug: 'test-signing'
github-artifact-id: '${{steps.upload_artifact.outputs.artifact-id}}'
wait-for-completion: true
output-artifact-directory: 'publish'
- name: Archive artifacts (welle.io Windows installer signed)
id: upload_artifact_self_signed
uses: actions/upload-artifact@v4
with:
name: welle.io Windows installer self-signed
path: publish\*.exe
if-no-files-found: error
- name: Upload to nightly server
uses: dennisameling/ftp-upload-action@v1
with:
server: a2f24.netcup.net # welle-io-nightlies.albrechtloh.de is redirected to here
secure: true
username: ${{ secrets.SFTP_USER }}
password: ${{ secrets.SFTP_PASSWORD }}
local_dir: publish/
- name: Production sign installer with SignPath
id: production_signing_installer
uses: signpath/github-action-submit-signing-request@v1
# Production signing needs a manual step in SignPath within 5 minutes.
# During development we don't need each build signed with a production key.
# So we can accept to fail here
continue-on-error: true
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: 'b7a507e8-ab76-445f-bfb5-05944bcbbee9'
project-slug: 'welle.io'
signing-policy-slug: 'release-signing'
github-artifact-id: '${{steps.upload_artifact.outputs.artifact-id}}'
wait-for-completion: true
output-artifact-directory: 'publish_production'
- name: Archive artifacts (welle.io Windows installer signed)
id: upload_artifact_production_signed
uses: actions/upload-artifact@v4
if: always() && steps.production_signing_installer.outcome == 'success'
with:
name: welle.io Windows installer production-signed
path: publish_production\*.exe
if-no-files-found: error