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

89 lines
2.7 KiB
YAML
Raw Normal View History

2020-12-01 23:23:15 +08:00
name: macos11_0-qt5_9_9
2019-12-07 15:45:19 +08:00
on:
push:
paths-ignore:
2020-12-01 18:35:27 +08:00
- '*.md'
2019-12-07 15:45:19 +08:00
- 'LICENSE'
2020-12-01 18:35:27 +08:00
- "doc/**"
- "preview/**"
2020-12-01 23:23:15 +08:00
- ".github/workflows/android*.yml"
- ".github/workflows/ios*.yml"
- ".github/workflows/ubuntu*.yml"
- ".github/workflows/windows*.yml"
2020-12-01 18:35:27 +08:00
# pull_request时触发workflow
2019-12-07 15:45:19 +08:00
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
2020-12-01 18:35:27 +08:00
- "doc/**"
- "preview/**"
2020-12-01 20:42:49 +08:00
- ".github/workflows/android.yml"
- ".github/workflows/ios.yml"
- ".github/workflows/ubuntu.yml"
- ".github/workflows/windows.yml"
2019-12-07 15:45:19 +08:00
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
2020-12-01 23:23:15 +08:00
os: [macos-11.0]
qt_ver: [5.9.9]
2019-12-07 15:45:19 +08:00
qt_arch: [clang_64]
env:
2020-10-21 20:12:56 +08:00
targetName: TaoQuickShow
2019-12-07 15:45:19 +08:00
steps:
2020-12-01 18:35:27 +08:00
# - 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}}
2020-06-15 09:08:00 +08:00
# - 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"
2019-12-07 15:45:19 +08:00
- name: Install Qt
2020-06-15 09:08:00 +08:00
# if: steps.MacosCacheQt.outputs.cache-hit != 'true'
2020-12-01 18:35:27 +08:00
uses: jurplel/install-qt-action@v2.10.0
2019-12-07 15:45:19 +08:00
with:
version: ${{ matrix.qt_ver }}
2020-12-01 18:35:27 +08:00
# cached: ${{ steps.MacosCacheQt.outputs.cache-hit }}
cached: 'false'
2020-12-02 00:25:20 +08:00
- 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
2019-12-07 15:45:19 +08:00
- 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: |
# 拷贝依赖
2019-12-07 16:46:15 +08:00
macdeployqt bin/release/${targetName}.app -qmldir=. -verbose=1 -dmg
2020-12-01 18:35:27 +08:00
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
2019-12-07 15:45:19 +08:00
asset_name: ${{ runner.os }}-${{ env.targetName }}.dmg
2020-12-01 18:35:27 +08:00
tag: ${{ github.ref }}
overwrite: true