-
Notifications
You must be signed in to change notification settings - Fork 19
54 lines (45 loc) · 1.55 KB
/
macOS.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
name: Build
on:
push:
branches:
- macOSbuildTest
jobs:
PC_Application_OSX:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
brew install qt@6 libusb pcre
- name: Test pkg-config
run: |
pkg-config --cflags libusb-1.0
- name: Set Environment
run: |
echo "/usr/local/opt/qt@6/bin" >> $GITHUB_PATH
- name: Get build timestamp
id: id_date
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT
- name: Get app version
id: id_version
run: |
cd Software/LibreCAL-GUI
fw_major=`pcregrep -o '(?<=FW_MAJOR=)[0-9]+' LibreCAL-GUI.pro`
fw_minor=`pcregrep -o '(?<=FW_MINOR=)[0-9]+' LibreCAL-GUI.pro`
fw_patch=`pcregrep -o '(?<=FW_PATCH=)[0-9]+' LibreCAL-GUI.pro`
echo "app_version=v$fw_major.$fw_minor.$fw_patch-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT
- name: Build application
run: |
cd Software/LibreCAL-GUI
qmake LibreCAL-GUI.pro
make -j9
macdeployqt LibreCAL-GUI.app
zip -ry LibreCAL-GUI.zip LibreCAL-GUI.app
shell: bash
- name: Upload artifact
env:
LIBRECAL_VERSION: "${{steps.id_version.outputs.app_version}}"
uses: actions/upload-artifact@v3
with:
name: LibreCAL-GUI-OSX-${{env.LIBRECAL_VERSION}}
path: Software/LibreCAL-GUI/LibreCAL-GUI.zip