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

74 lines
2.0 KiB
YAML
Raw Normal View History

2020-12-02 09:01:45 +08:00
name: macos-11_0
on:
# push代码时触发workflow
2020-12-02 09:01:45 +08:00
push:
paths:
- '3rdparty/**'
- 'examples/**'
- 'mkspecs/**'
- 'src/**'
- '.qmake.conf'
- 'TaoQuick.pro'
- '.github/workflows/macos-11_0.yml'
2020-12-02 09:01:45 +08:00
# pull_request时触发workflow
pull_request:
paths:
- '3rdparty/**'
- 'examples/**'
- 'mkspecs/**'
- 'src/**'
- '.qmake.conf'
- 'TaoQuick.pro'
- '.github/workflows/macos-11_0.yml'
2020-12-02 09:01:45 +08:00
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11.0]
qt_ver: [5.9.9,5.12.10,5.15.2]
qt_arch: [clang_64]
env:
targetName: TaoQuickShow
steps:
- name: prepare env
run: |
softwareupdate --all --install --force
2022-01-05 19:41:45 +08:00
sudo xcode-select --print-path
sudo xcode-select --switch /Library/Developer/CommandLineTools
2020-12-02 09:01:45 +08:00
- name: Install Qt
2021-03-01 09:45:19 +08:00
uses: jurplel/install-qt-action@v2.13.0
2020-12-02 09:01:45 +08:00
with:
version: ${{ matrix.qt_ver }}
cached: 'false'
2021-03-01 09:45:19 +08:00
- uses: actions/checkout@v2
2020-12-02 09:01:45 +08:00
with:
fetch-depth: 1
2021-01-25 14:27:03 +08:00
submodules: 'true'
2020-12-02 09:01:45 +08:00
- name: build macos
run: |
qmake
make
2021-01-25 13:46:00 +08:00
# 打包
- name: package
run: |
# 拷贝依赖
macdeployqt bin/release/${targetName}.app -qmldir=. -verbose=1 -dmg
# 上传artifacts
- uses: actions/upload-artifact@v2
with:
name: ${targetName}_${{matrix.qt_ver}}.zip
path: bin/release/${targetName}.app
# 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
tag: ${{ github.ref }}
overwrite: true