1
0
mirror of https://github.com/jaredtao/TaoQuick.git synced 2025-01-19 20:22:56 +08:00
TaoQuick/.github/workflows/macos11_0-qt5_9_9.yml
2020-12-02 00:25:20 +08:00

89 lines
2.7 KiB
YAML

name: macos11_0-qt5_9_9
on:
push:
paths-ignore:
- '*.md'
- 'LICENSE'
- "doc/**"
- "preview/**"
- ".github/workflows/android*.yml"
- ".github/workflows/ios*.yml"
- ".github/workflows/ubuntu*.yml"
- ".github/workflows/windows*.yml"
# pull_request时触发workflow
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
- "doc/**"
- "preview/**"
- ".github/workflows/android.yml"
- ".github/workflows/ios.yml"
- ".github/workflows/ubuntu.yml"
- ".github/workflows/windows.yml"
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11.0]
qt_ver: [5.9.9]
qt_arch: [clang_64]
env:
targetName: TaoQuickShow
steps:
# - name: cacheQt
# id: MacosCacheQt
# uses: actions/cache@v1
# with:
# path: ../Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
# key: ${{ runner.os }}-Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
# - name: setupQt
# if: steps.MacosCacheQt.outputs.cache-hit == 'true'
# shell: pwsh
# env:
# QtPath: ../Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
# run: |
# $qt_Path=${env:QtPath}
# echo "::set-env name=Qt5_Dir::$qt_Path"
# echo "::add-path::$qt_Path/bin"
- name: Install Qt
# if: steps.MacosCacheQt.outputs.cache-hit != 'true'
uses: jurplel/install-qt-action@v2.10.0
with:
version: ${{ matrix.qt_ver }}
# cached: ${{ steps.MacosCacheQt.outputs.cache-hit }}
cached: 'false'
- name: prepare env
run: |
softwareupdate --all --install --force
sudo rm -rf /Library/Developer/CommandLineTools
pip install multidict
sudo xcode-select --install
sudo xcode-select --switch /Library/Developer/CommandLineTools
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: build macos
run: |
qmake
make
# tag 打包
- name: package
if: startsWith(github.event.ref, 'refs/tags/')
run: |
# 拷贝依赖
macdeployqt bin/release/${targetName}.app -qmldir=. -verbose=1 -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: ${{ runner.os }}-${{ env.targetName }}.dmg
tag: ${{ github.ref }}
overwrite: true