diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab7391f..494105b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -261,69 +261,66 @@ jobs: asset_name: ModManager-${{ env.VERSION }}-x64-Installer.exe tag: ${{ github.ref }} overwrite: true - # build-on-osx: - # name: Build On OSX - # runs-on: ${{ matrix.os }} - # strategy: - # fail-fast: false - # matrix: - # os: [macOS-latest] - # qt_ver: [6.7.1] - # qt_arch: [clang_64] - # steps: - # - name: Install Qt - # uses: jurplel/install-qt-action@v4 - # with: - # aqtversion: '==2.1.*' - # version: ${{ matrix.qt_ver }} - # host: 'mac' - # target: 'desktop' - # arch: ${{ matrix.qt_arch }} - # modules: 'qtwebengine' - # - name: Install libaria2 - # run: | - # wget "https://github.com/kaniol-lck/aria2/releases/download/libaria2-release-1.36.0/libaria2-clang-macos-10.15.zip" - # unzip *.zip - # csrutil status - # sudo cp -r lib/ usr/local/lib/ - # sudo cp -r include/aria2/ usr/local/include/ - # rm -rf lib/ include/ *.zip - # - name: Install dependencies - # run: | - # brew install quazip gnu-sed aria2 - # - uses: actions/checkout@v2 - # with: - # fetch-depth: 1 - # - name: Set Env - # shell: bash - # run: | - # export RAW_VERSION=$(grep -o '".*"' src/version.h | sed 's/"//g') - # export VERSION=$RAW_VERSION-build.$GITHUB_RUN_NUMBER - # echo "RAW_VERSION=${RAW_VERSION}" >> $GITHUB_ENV - # echo "VERSION=${VERSION}" >> $GITHUB_ENV - # - name: Modify version number - # if: ${{ !startsWith(github.event.ref, 'refs/tags/') }} - # shell: bash - # run: | - # gsed -i "s/$RAW_VERSION/$VERSION/" src/version.h - # - name: build macos - # run: | - # qmake - # make - # - name: package - # run: | - # macdeployqt modmanager.app -qmldir=. -verbose=1 -dmg - # shell: sh - # - uses: actions/upload-artifact@v2 - # with: - # name: ModManager-${{ env.VERSION }}.dmg - # path: modmanager.dmg - # - name: uploadRelease - # if: startsWith(github.event.ref, 'refs/tags/') - # uses: svenstaro/upload-release-action@v2 - # with: - # repo_token: ${{ secrets.GITHUB_TOKEN }} - # file: modmanager.dmg - # asset_name: ModManager-${{ env.VERSION }}.dmg - # tag: ${{ github.ref }} - # overwrite: true + build-on-osx: + name: Build On OSX + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macOS-latest] + qt_ver: [6.7.1] + qt_arch: [clang_64] + steps: + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + aqtversion: '==2.1.*' + version: ${{ matrix.qt_ver }} + host: 'mac' + target: 'desktop' + arch: ${{ matrix.qt_arch }} + modules: 'qtwebengine' + - name: Install libaria2 + run: | + wget "https://github.com/kaniol-lck/aria2/releases/download/release-1.36.0/libaria2-clang-macos-10.15.zip" + unzip *.zip + osascript MaintenanceTool.scpt + - name: Install dependencies + run: | + brew install quazip gnu-sed aria2 + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + - name: Set Env + shell: bash + run: | + export RAW_VERSION=$(grep -o '".*"' src/version.h | sed 's/"//g') + export VERSION=$RAW_VERSION-build.$GITHUB_RUN_NUMBER + echo "RAW_VERSION=${RAW_VERSION}" >> $GITHUB_ENV + echo "VERSION=${VERSION}" >> $GITHUB_ENV + - name: Modify version number + if: ${{ !startsWith(github.event.ref, 'refs/tags/') }} + shell: bash + run: | + gsed -i "s/$RAW_VERSION/$VERSION/" src/version.h + - name: build macos + run: | + qmake + make + - name: package + run: | + macdeployqt modmanager.app -qmldir=. -verbose=1 -dmg + shell: sh + - uses: actions/upload-artifact@v2 + with: + name: ModManager-${{ env.VERSION }}.dmg + path: modmanager.dmg + - name: uploadRelease + if: startsWith(github.event.ref, 'refs/tags/') + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: modmanager.dmg + asset_name: ModManager-${{ env.VERSION }}.dmg + tag: ${{ github.ref }} + overwrite: true