Skip to content

Update OCAT V_20240002 #1770

Update OCAT V_20240002

Update OCAT V_20240002 #1770

Workflow file for this run

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-11]
# 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: OCAuxiliaryTools
VERSION: Mac
orgName: OCAT
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v2.13.0
with:
version: ${{ matrix.qt_ver }}
cached: 'false'
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: build macos
run: |
qmake
make
# 打包
- name: package
run: |
# 拷贝依赖
cp -r Database bin/release/${targetName}.app/Contents/MacOS/Database
chmod +x bin/release/${targetName}.app/Contents/MacOS/Database/mac/macserial
chmod +x bin/release/${targetName}.app/Contents/MacOS/Database/mac/ocvalidate
chmod +x bin/release/${targetName}.app/Contents/MacOS/Database/mac/ocpasswordgen
chmod +x bin/release/${targetName}.app/Contents/MacOS/Database/mac/CreateVault/create_vault.sh
chmod +x bin/release/${targetName}.app/Contents/MacOS/Database/mac/CreateVault/RsaTool
chmod +x bin/release/${targetName}.app/Contents/MacOS/Database/mac/CreateVault/sign.command
#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
cp -f Database/mac/aria2c bin/release/${targetName}.app/Contents/MacOS/aria2c
chmod +x bin/release/${targetName}.app/Contents/MacOS/aria2c
rm bin/release/${targetName}.app/Contents/MacOS/Database/mac/aria2c
# 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@v2
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