1
0
mirror of https://github.com/jaredtao/TaoQuick.git synced 2025-01-31 21:22:58 +08:00

68 lines
1.8 KiB
YAML
Raw Normal View History

2020-12-02 00:39:16 +08:00
name: MacOS
2019-12-07 15:45:19 +08:00
on:
# push代码时触发workflow
2019-12-07 15:45:19 +08:00
push:
paths:
- '3rdparty/**'
- 'examples/**'
- 'mkspecs/**'
- 'src/**'
- '.qmake.conf'
- 'TaoQuick.pro'
- '.github/workflows/macos.yml'
2020-12-01 18:35:27 +08:00
# pull_request时触发workflow
2019-12-07 15:45:19 +08:00
pull_request:
paths:
- '3rdparty/**'
- 'examples/**'
- 'mkspecs/**'
- 'src/**'
- '.qmake.conf'
- 'TaoQuick.pro'
- '.github/workflows/macos.yml'
2019-12-07 15:45:19 +08:00
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
2020-12-02 09:01:45 +08:00
os: [macos-10.15]
2020-12-02 00:39:16 +08:00
qt_ver: [5.9.9,5.12.10,5.15.2]
2019-12-07 15:45:19 +08:00
qt_arch: [clang_64]
env:
2020-10-21 20:12:56 +08:00
targetName: TaoQuickShow
2020-12-02 00:39:16 +08:00
steps:
2020-12-02 08:42:02 +08:00
- name: Install Qt
2021-03-01 09:45:19 +08:00
uses: jurplel/install-qt-action@v2.13.0
2020-12-02 08:42:02 +08:00
with:
version: ${{ matrix.qt_ver }}
cached: 'false'
2021-03-01 09:45:19 +08:00
- uses: actions/checkout@v2
2019-12-07 15:45:19 +08:00
with:
fetch-depth: 1
2021-01-25 14:27:03 +08:00
submodules: 'true'
2019-12-07 15:45:19 +08:00
- name: build macos
run: |
qmake
make
2021-01-18 15:06:52 +08:00
# 打包
2019-12-07 15:45:19 +08:00
- name: package
run: |
# 拷贝依赖
2019-12-07 16:46:15 +08:00
macdeployqt bin/release/${targetName}.app -qmldir=. -verbose=1 -dmg
2020-12-18 13:27:41 +08:00
# 上传artifacts
- uses: actions/upload-artifact@v2
with:
2021-03-01 09:45:19 +08:00
name: ${{ env.targetName }}_${{matrix.qt_ver}}.zip
path: bin/release/${{ env.targetName }}.app
2019-12-07 15:45:19 +08:00
# tag 上传Release
- name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/')
2020-12-01 18:35:27 +08:00
uses: svenstaro/upload-release-action@v2
2019-12-07 15:45:19 +08:00
with:
2020-12-01 18:35:27 +08:00
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bin/release/${{ env.targetName }}.dmg
2020-12-18 22:38:25 +08:00
asset_name: ${{ env.targetName }}_${{ matrix.os }}_${{ matrix.qt_ver }}.dmg
2020-12-01 18:35:27 +08:00
tag: ${{ github.ref }}
overwrite: true