-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (42 loc) · 1.31 KB
/
main.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
name: Build CaptiveDNS
on:
push:
branches:
- main
- ci-release
pull_request:
branches:
- main
jobs:
all:
strategy:
matrix:
os: [ubuntu, windows, macos]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@main
- name: Install Qt
uses: jurplel/install-qt-action@v3
- uses: ilammy/msvc-dev-cmd@v1
- name: Build for ${{ matrix.os }}
shell: bash
run: cd CaptiveDNS && qmake && (make || nmake || (rm /usr/bin/link && nmake))
- name: Bundle for ${{ matrix.os }}
shell: bash
run: |
if [[ "${{ matrix.os }}" == "macos" ]]; then
macdeployqt ./CaptiveDNS/CaptiveDNS.app -dmg
zip -r ./CaptiveDNS-${{ matrix.os }}.zip ./CaptiveDNS/CaptiveDNS.dmg
elif [[ "${{ matrix.os }}" == "windows" ]]; then
mkdir -p ./CaptiveDNS/CaptiveDNS
tree
# cp ./CaptiveDNS/CaptiveDNS.exe ./CaptiveDNS/CaptiveDNS
windeployqt ./CaptiveDNS/CaptiveDNS/CaptiveDNS.exe
zip -r ./CaptiveDNS-${{ matrix.os }}.zip ./CaptiveDNS/CaptiveDNS
else
zip -r ./CaptiveDNS-${{ matrix.os }}.zip ./CaptiveDNS/CaptiveDNS
fi
- uses: actions/upload-artifact@v3
with:
name: CaptiveDNS-${{ matrix.os }}
path: ./CaptiveDNS-${{ matrix.os }}.zip