This repository has been archived by the owner on May 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (68 loc) · 1.79 KB
/
Windows.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
name: Windows
on:
push:
paths-ignore:
- '*.md'
- 'LICENSE'
pull_request:
paths-ignore:
- '*.md'
- 'LICENSE'
jobs:
#windows编译
Build-Windows:
#运行平台
name: Build on Windows
runs-on: windows-2019
#编译步骤
steps:
#1安装Qt
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.15.2'
host: 'windows'
arch: 'win64_msvc2019_64'
modules: qtcharts
target: 'desktop'
#2拉取代码
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
#3编译构建
- name: Build
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
qmake
nmake
#4打包部署
- name: package
run: |
md D:/a/colutius/colutius/build
copy D:/a/colutius/colutius/release/colutius.exe D:/a/colutius/colutius/build
windeployqt.exe D:/a/colutius/colutius/build/colutius.exe
#5打包成zip
- name: To zip
uses: thedoctor0/zip-release@master
with:
type: 'zip'
path: 'build'
filename: 'colutius_Windows.zip'
#6上传artifact
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: colutius_Windows
path: D:/a/colutius/colutius/build
if-no-files-found: error
#7发布release
- name: Upload Release
if: startsWith(github.ref, 'refs/tags')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.TOKEN }}
file: colutius_Windows.zip
tag: ${{ github.ref }}
overwrite: true