Update Preferences.ui #1168
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MacOS | |
on: | |
push: | |
paths: | |
- '*.pro' | |
- '**' | |
- '.github/workflows/macos.yml' | |
pull_request: | |
paths: | |
- '*.pro' | |
- '**' | |
- '.github/workflows/macos.yml' | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macOS-latest] | |
# os: [macos-11.0] | |
# qt_ver: [5.9.9,5.12.10,5.15.2] | |
qt_ver: [5.15.2] | |
#qt_ver: [6.0.0] | |
qt_arch: [clang_64] | |
env: | |
targetName: Knot | |
VERSION: Mac | |
orgName: Knot | |
steps: | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ matrix.qt_ver }} | |
cached: 'false' | |
modules: qtcharts qtwebengine | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: build macos | |
run: | | |
qmake | |
make | |
# 打包 | |
- name: package | |
run: | | |
# 拷贝依赖 | |
#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 | |
cp -f Info.plist bin/release/${targetName}.app/Contents/Info.plist | |
# macdeployqt bin/release/${targetName}.app -qmldir=. -verbose=1 -dmg | |
cp -R -p -f bin/release/${targetName}.app ${targetName}.app | |
macdeployqt ${targetName}.app -qmldir=. -verbose=1 -dmg | |
cp ${targetName}.dmg bin/release/${targetName}.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 |