GitHub Actions: Build macOS dmg file only on release

The regular builds should be as fast as possible.

Change-Id: I76b9ac009831192053f2163b1f73fb2183f3e791
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2021-11-30 11:35:09 +01:00
parent 7f1b2bda9d
commit e6957808ec

View File

@@ -483,8 +483,10 @@ jobs:
string(REPLACE "x86" "x64" Python3_EXECUTABLE "${Python3_EXECUTABLE}")
set(WITH_TESTS "--with-tests")
set(NO_DMG "--no-dmg")
if (${{github.ref}} MATCHES "tags/v")
unset(WITH_TESTS)
unset(NO_DMG)
endif()
execute_process(
@@ -500,6 +502,7 @@ jobs:
${WITH_TESTS}
${CDB_OPTION}
${ELFUTILS_OPTION}
${NO_DMG}
--add-config=-DCMAKE_C_COMPILER_LAUNCHER=ccache
--add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
--add-config=-DIDE_REVISION_URL=https://github.com/$ENV{GITHUB_REPOSITORY}/commits/$ENV{GITHUB_SHA}
@@ -588,7 +591,7 @@ jobs:
name: qtcreatorcdbext-${{ matrix.config.artifact }}-${{ github.run_id }}.7z
- name: Upload disk image
if: runner.os == 'macOS'
if: runner.os == 'macOS' && contains(github.ref, 'tags/v')
uses: actions/upload-artifact@v2
with:
path: build/qt-creator-${{ matrix.config.artifact }}-${{ github.run_id }}.dmg