Skip to content

Commit f0fb84d

Browse files
committed
Update github actions to create a windows installer
1 parent 7bab6be commit f0fb84d

File tree

1 file changed

+50
-2
lines changed

1 file changed

+50
-2
lines changed

.github/workflows/release.yml

+50-2
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,58 @@ jobs:
6767
name: ubuntu-${{matrix.os_name}}
6868
path: '*.deb'
6969

70+
build-windows-installer:
71+
runs-on: windows-2022
72+
strategy:
73+
fail-fast: false
74+
matrix:
75+
msystem: ['mingw64', 'mingw32']
76+
defaults:
77+
run:
78+
shell: msys2 {0}
79+
steps:
80+
- name: Disable autocrlf in Git
81+
shell: pwsh
82+
# https://github.com/msys2/setup-msys2?tab=readme-ov-file#actionscheckout-and-line-endings
83+
run: |
84+
git config --global core.autocrlf false
85+
git config --global core.eol lf
86+
87+
- name: Checkout repository
88+
uses: actions/checkout@v4
89+
90+
- name: Set up MSYS2 environment
91+
# The qt5-serialport package is now missing from mingw32, so we use
92+
# a static build. The openssl package is needed for qt-static, but it is
93+
# not in the qt5-static dependencies and so has to be installed explicitly.
94+
uses: msys2/setup-msys2@v2
95+
with:
96+
msystem: ${{matrix.msystem}}
97+
cache: true
98+
update: true
99+
install: >-
100+
make
101+
zip
102+
pacboy: >-
103+
gcc:p
104+
nsis:p
105+
qt5-static:p
106+
openssl:p
107+
108+
- name: 'Build'
109+
run: install/win-msys2-build.sh -s windows -v ${{ github.ref_name }} -q /${{matrix.msystem}}/qt5-static/bin/qmake.exe
110+
111+
- name: 'Upload windows installers'
112+
uses: actions/upload-artifact@v4
113+
with:
114+
name: windows-${{matrix.msystem}}
115+
path: |
116+
*.exe
117+
*.zip
118+
70119
create-release:
71120
runs-on: ubuntu-latest
72-
needs: [build-debian-packages, build-ubuntu-packages]
121+
needs: [build-debian-packages, build-ubuntu-packages, build-windows-installer]
73122
steps:
74123
- name: Download build artifacts
75124
uses: actions/download-artifact@v4
@@ -97,7 +146,6 @@ jobs:
97146
run: |
98147
echo "RELEASE_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
99148
echo "TAG_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
100-
echo "TAG_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
101149
102150
- name: Create GitHub Release
103151
continue-on-error: false

0 commit comments

Comments
 (0)