-
Notifications
You must be signed in to change notification settings - Fork 152
171 lines (140 loc) · 5.35 KB
/
create-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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
name: Create Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
# Customize the CMake build type here (Release, Debug)
BUILD_TYPE: Release
RELEASE_VERSION: ${{github.ref_name}}
jobs:
initialize:
name: Prepare Release
runs-on: ubuntu-latest
steps:
- name: Version Number
run: echo create release for tag ${{github.ref_name}}
build-windows:
name: Build Windows Release-x86_64
needs: initialize
runs-on: windows-latest
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
- name: Checkout Source
uses: actions/checkout@v2
with:
submodules: "true"
- name: Cache CEF folders
uses: actions/cache@v2
with:
path: ${{github.workspace}}/CefViewCore/dep
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -A x64 -DPROJECT_ARCH=x86_64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_DEMO=ON -DCMAKE_INSTALL_PREFIX:PATH=${{github.workspace}}/out/install
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Install
run: cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Create SDK artifact
uses: actions/upload-artifact@v3
with:
name: QCefView.windows.x86_64
path: ${{github.workspace}}/out/install/QCefView
- name: Create Demo artifact
uses: actions/upload-artifact@v3
with:
name: QCefViewTest.windows.x86_64
path: ${{github.workspace}}/out/install/QCefViewTest
build-macos:
name: Build macOS Release-x86_64
needs: initialize
runs-on: macos-latest
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
setup-python: "false"
- name: Checkout Source
uses: actions/checkout@v2
with:
submodules: "true"
- name: Cache CEF folders
uses: actions/cache@v2
with:
path: ${{github.workspace}}/CefViewCore/dep
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Configure CMake
run: cmake -G "Xcode" -B ${{github.workspace}}/build -DPROJECT_ARCH=x86_64 -DBUILD_DEMO=ON -DUSE_SANDBOX=ON -DCMAKE_INSTALL_PREFIX:PATH=${{github.workspace}}/out/install
- name: Build QCefView
run: xcodebuild -project ${{github.workspace}}/build/QCefView.xcodeproj -target QCefView -configuration ${{env.BUILD_TYPE}}
- name: Build QCefViewTest
run: xcodebuild -project ${{github.workspace}}/build/QCefView.xcodeproj -target QCefViewTest -configuration ${{env.BUILD_TYPE}}
- name: Install
# Collect the output
run: cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Create SDK artifact
uses: actions/upload-artifact@v3
# Upload artifact
with:
name: QCefView.macos.x86_64
path: ${{github.workspace}}/out/install/QCefView
- name: Create Demo artifact
uses: actions/upload-artifact@v3
# Upload artifact
with:
name: QCefViewTest.macos.x86_64
path: ${{github.workspace}}/out/install/QCefViewTest
build-linux:
name: Build Linux Release-x86_64
needs: initialize
runs-on: ubuntu-latest
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
- name: Checkout Source
uses: actions/checkout@v2
with:
submodules: "true"
- name: Cache CEF folders
uses: actions/cache@v2
with:
path: ${{github.workspace}}/CefViewCore/dep
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DPROJECT_ARCH=x86_64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_DEMO=ON -DUSE_SANDBOX=ON -DCMAKE_INSTALL_PREFIX:PATH=${{github.workspace}}/out/install
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Install
# Collect the output
run: cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Create SDK artifact
uses: actions/upload-artifact@v3
# Upload artifact
with:
name: QCefView.linux.x86_64
path: ${{github.workspace}}/out/install/QCefView
- name: Create Demo artifact
uses: actions/upload-artifact@v3
# Upload artifact
with:
name: QCefViewTest.linux.x86_64
path: ${{github.workspace}}/out/install/QCefViewTest
archive-release:
name: Create and Publish Release
needs: [build-windows, build-macos, build-linux]
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: ${{github.workspace}}/artifacts
- name: Archive all artifacts
run: for dir in ${{github.workspace}}/artifacts/*; do ( cd $dir && zip -r $dir-${{github.ref_name}}.zip . ) done
- name: Publish Release
uses: softprops/action-gh-release@v1
with:
name: QCefView-${{github.ref_name}}
generate_release_notes: true
files: ${{github.workspace}}/artifacts/*.zip