-
Notifications
You must be signed in to change notification settings - Fork 28
79 lines (68 loc) · 2.44 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
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
name: MacOS
on:
push:
paths:
- '*.pro'
- '**'
- '.github/workflows/macos.yml'
pull_request:
paths:
- '*.pro'
- '**'
- '.github/workflows/macos.yml'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-10.15]
# qt_ver: [5.9.9,5.12.10,5.15.2]
qt_ver: [5.15.2]
qt_arch: [clang_64]
env:
targetName: Xiasl
VERSION: Mac
steps:
- name: Install Qt
uses: jurplel/[email protected]
with:
version: ${{ matrix.qt_ver }}
cached: 'false'
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: build macos
run: |
qmake
make
# 打包 拷贝依赖
# macdeployqt bin/release/${targetName}.app -qmldir=. -verbose=1 -dmg
- name: package
run: |
cp -r ExtBin/mac/. bin/release/${targetName}.app/Contents/MacOS/
chmod +x bin/release/${targetName}.app/Contents/MacOS/iasl
chmod +x bin/release/${targetName}.app/Contents/MacOS/patchmatic
chmod +x bin/release/${targetName}.app/Contents/MacOS/patchmatic-legacy
mkdir bin/release/${targetName}.app/Contents/Frameworks
cp libqscintilla2_qt5.15.0.0.dylib bin/release/${targetName}.app/Contents/Frameworks/libqscintilla2_qt5.15.dylib
rm -rf bin/release/${targetName}.app/Contents/PlugIns/bearer
cp -f Info.plist bin/release/${targetName}.app/Contents/Info.plist
macdeployqt bin/release/${targetName}.app -dmg
# 上传artifacts
- uses: actions/upload-artifact@v2
with:
#name: ${{ env.targetName }}_${{ matrix.os }}_${{matrix.qt_ver}} # .zip
name: ${{ env.targetName }}_${{ env.VERSION }}
path: bin/release/${{ env.targetName }}.dmg
# tag 上传Release
- name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bin/release/${{ env.targetName }}.dmg
#asset_name: ${{ env.targetName }}_${{ matrix.os }}_${{ matrix.qt_ver }}.dmg
asset_name: ${{ env.targetName }}_${{ env.VERSION }}.dmg
tag: ${{ github.ref }}
overwrite: true