-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (105 loc) · 2.79 KB
/
release.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
name: Release Build
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.8.1'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2022_64'
- name: Build
run: |
echo $RUNNER_WORKSPACE
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=$RUNNER_WORKSPACE/Qt/6.8.1/msvc2022_64_static
cmake --build . --config Release
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: windows-build
path: build/Release/add_schema.exe
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.8.1'
host: 'linux'
target: 'desktop'
arch: 'linux_gcc_64'
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libgl1-mesa-dev
- name: Build
run: |
echo $RUNNER_WORKSPACE
mkdir build
cd build
cmake ..
cmake --build . --config Release
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: linux-build
path: build/add_schema
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.8.1'
host: 'mac'
target: 'desktop'
arch: 'clang_64'
- name: Build
run: |
echo $RUNNER_WORKSPACE
mkdir build
cd build
cmake ..
cmake --build . --config Release
- name: Package macOS App
run: |
cd build
macdeployqt add_schema.app -dmg
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: macos-build
path: build/add_schema.dmg
create-release:
needs: [build-windows, build-linux, build-macos]
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
- name: Debug file structure
run: |
ls -R
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.tag }}
name: Release ${{ github.event.inputs.tag }}
files: |
windows-build/*
linux-build/*
macos-build/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}