-
Notifications
You must be signed in to change notification settings - Fork 337
90 lines (78 loc) · 3.36 KB
/
macos1012.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
name: MacOS 10.12
on:
push:
paths:
- '*.pro'
- '**'
- '.github/workflows/macos1012.yml'
pull_request:
paths:
- '*.pro'
- '**'
- '.github/workflows/macos1012.yml'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
# qt_ver: [5.9.9,5.12.10,5.15.2]
qt_ver: [5.9.9]
qt_arch: [clang_64]
env:
targetName: OCAuxiliaryTools
VERSION: Mac10.12 and below
orgName: OCAT
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
cached: 'false'
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: build macos
run: |
qmake
make
# 打包
- name: package
run: |
# 拷贝依赖
cp -r Database bin/release/${targetName}.app/Contents/MacOS/Database
cp -f Database/mac/aria2c bin/release/${targetName}.app/Contents/MacOS/aria2c
chmod +x bin/release/${targetName}.app/Contents/MacOS/aria2c
rm bin/release/${targetName}.app/Contents/MacOS/Database/mac/aria2c
chmod +x bin/release/${targetName}.app/Contents/MacOS/Database/mac/macserial
chmod +x bin/release/${targetName}.app/Contents/MacOS/Database/mac/ocvalidate
chmod +x bin/release/${targetName}.app/Contents/MacOS/Database/mac/ocpasswordgen
chmod +x bin/release/${targetName}.app/Contents/MacOS/Database/mac/CreateVault/create_vault.sh
chmod +x bin/release/${targetName}.app/Contents/MacOS/Database/mac/CreateVault/RsaTool
chmod +x bin/release/${targetName}.app/Contents/MacOS/Database/mac/CreateVault/sign.command
#cp -r devDatabase bin/release/${targetName}.app/Contents/MacOS/devDatabase
#chmod +x bin/release/${targetName}.app/Contents/MacOS/devDatabase/mac/macserial
#chmod +x bin/release/${targetName}.app/Contents/MacOS/devDatabase/mac/ocvalidate
#chmod +x bin/release/${targetName}.app/Contents/MacOS/devDatabase/mac/ocpasswordgen
#chmod +x bin/release/${targetName}.app/Contents/MacOS/devDatabase/mac/CreateVault/create_vault.sh
#chmod +x bin/release/${targetName}.app/Contents/MacOS/devDatabase/mac/CreateVault/RsaTool
#chmod +x bin/release/${targetName}.app/Contents/MacOS/devDatabase/mac/CreateVault/sign.command
macdeployqt bin/release/${targetName}.app -qmldir=. -verbose=1 -dmg
# 上传artifacts
- uses: actions/upload-artifact@v4
with:
#name: ${{ env.targetName }}_${{ matrix.os }}_${{matrix.qt_ver}} # .zip
name: ${{ env.orgName }}_${{ 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.orgName }}_${{ env.VERSION }}.dmg
tag: ${{ github.ref }}
overwrite: true