-
Notifications
You must be signed in to change notification settings - Fork 195
66 lines (54 loc) · 1.85 KB
/
serialplot-release.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
name: Serialplot build and release action
run-name: Building ${{ github.event.repository.name }} ${{ github.ref_name }}
on:
push:
tags:
- "v*"
permissions:
contents: write
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- name: Install Qt on Windows
if: runner.os == 'Windows'
uses: jurplel/install-qt-action@v4
with:
version: 6.4.0
modules: qtserialport
arch: win64_mingw
- name: Install dependencies on Ubuntu
if: runner.os == 'Linux'
run: sudo apt-get install -y --no-install-recommends libgl1-mesa-dev qt6-base-dev libqt6serialport6-dev libqt6svg6-dev
- name: Check out repository code
uses: actions/checkout@v4
- name: Configure CMake
run: cmake -G 'Unix Makefiles' -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Package installer
run: cmake --build ${{github.workspace}}/build -t package
- name: Package appimage for ubuntu
if: runner.os == 'Linux'
run: cmake --build ${{github.workspace}}/build -t appimage
- name: Upload ubuntu files to Release
if: runner.os == 'Linux'
uses: softprops/action-gh-release@v2
with:
fail_on_unmatched_files: true
files: |
build/*.deb
build/SerialPlot*.AppImage
- name: Upload windows files to Release
if: runner.os == 'Windows'
uses: softprops/action-gh-release@v2
with:
fail_on_unmatched_files: true
files: |
build/*win64.exe