Skip to content

Update github release step action #64

Update github release step action

Update github release step action #64

Workflow file for this run

name: MacOS
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- main
release:
types: [published]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
arch: [arm64, x86_64]
qt:
- version: 6.5.3
modules: qtwebengine qtwebchannel qtpositioning
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt.version }}
modules: ${{ matrix.qt.modules }}
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Build MacOS
env:
QT_VERSION: ${{ matrix.qt.version }}
CMAKE_PREFIX_PATH: ${{ env.Qt6_DIR }}/lib/cmake
CMAKE_BUILD_TYPE: Release
run: |
# ls -al ${{ github.workspace }}/..
# ls -al ${{ github.workspace }}/../Qt/${{ matrix.qt.version }}
# ls -al ${{ github.workspace }}/../Qt/${{ matrix.qt.version }}/macos
# ls -al ${{ github.workspace }}/../Qt/${{ matrix.qt.version }}/macos/lib
# ls -al ${{ github.workspace }}/../Qt/${{ matrix.qt.version }}/macos/lib/cmake
# ls -al
mkdir -p build/${{ matrix.arch }}
cd build/${{ matrix.arch }}
cmake ../..
make
cd ../..
ls -al build/${{ matrix.arch }}
- name: Package Application
run: |
cd build/${{ matrix.arch }}
os=$(echo "${{ matrix.os }}" | sed 's/-latest//')
repository_name=$(basename ${{ github.repository }})
zipfile=${repository_name}-${os}-${{ matrix.arch }}-${{ github.run_number }}.zip
macdeployqt ${repository_name}.app -always-overwrite
zip -r ${zipfile} ${repository_name}.app
mv ${zipfile} ../..
cd ../..
ls -al
echo "${zipfile}" > assets.txt
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: $(cat assets.txt)