Fix setup-cmake action for macOS CI #63
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: Build | |
on: | |
push: | |
paths-ignore: | |
- 'README.md' | |
- 'LICENSE' | |
branches: | |
- master | |
- development | |
tags: | |
- v[0-9].[0-9].[0-9]* | |
pull_request: | |
branches: | |
- master | |
- development | |
jobs: | |
build_linux: | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
include: | |
- qt_version: '5.12.8' | |
compiler_c: 'gcc' | |
compiler_cpp: 'g++' | |
- qt_version: '5.12.8' | |
compiler_c: 'clang' | |
compiler_cpp: 'clang++' | |
- qt_version: '5.15.4' | |
compiler_c: 'gcc' | |
compiler_cpp: 'g++' | |
- qt_version: '5.15.4' | |
compiler_c: 'clang' | |
compiler_cpp: 'clang++' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install non-Qt dependencies | |
id: install_non_qt_deps | |
run: | | |
sudo apt-get -qq update | |
sudo apt-get -qq install cmake ninja-build p7zip-full coreutils curl | |
- name: Install gcc | |
id: install_gcc | |
run: | | |
sudo apt-get -qq install gcc g++ | |
if: ${{ matrix.compiler_cpp == 'g++' }} | |
- name: Install clang | |
id: install_clang | |
run: | | |
sudo apt-get -qq install clang | |
if: ${{ matrix.compiler_cpp == 'clang++' }} | |
- name: Install Qt 5.12.8 | |
id: install_qt_old | |
run: | | |
sudo apt-get -qq install qtbase5-dev qttools5-dev qttools5-dev-tools | |
if: ${{ matrix.qt_version == '5.12.8' }} | |
- name: Install Qt 5.15.4 | |
id: install_qt_modern | |
run: | | |
sudo apt-add-repository -y ppa:beineri/opt-qt-5.15.4-focal | |
sudo apt-get -qq update | |
sudo apt-get -qq install qt515tools qt515base mesa-common-dev libgl1-mesa-dev | |
if: ${{ matrix.qt_version == '5.15.4' }} | |
shell: bash | |
- name: Configure for gcc and Qt 5.12.8 | |
id: configure_for_gcc_and_qt_old | |
run: | | |
mkdir $GITHUB_WORKSPACE/build | |
cd $GITHUB_WORKSPACE/build | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$(pwd)/installdir -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ .. | |
if: ${{ matrix.compiler_cpp == 'g++' && matrix.qt_version == '5.12.8' }} | |
- name: Configure for gcc and Qt 5.15.4 | |
id: configure_for_gcc_and_qt_modern | |
run: | | |
mkdir $GITHUB_WORKSPACE/build | |
cd $GITHUB_WORKSPACE/build | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$(pwd)/installdir -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_PREFIX_PATH=/opt/qt515 .. | |
if: ${{ matrix.compiler_cpp == 'g++' && matrix.qt_version == '5.15.4' }} | |
- name: Configure for clang and Qt 5.12.8 | |
id: configure_for_clang_and_qt_old | |
run: | | |
mkdir $GITHUB_WORKSPACE/build | |
cd $GITHUB_WORKSPACE/build | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$(pwd)/installdir -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ .. | |
if: ${{ matrix.compiler_cpp == 'clang++' && matrix.qt_version == '5.12.8' }} | |
- name: Configure for clang and Qt 5.15.4 | |
id: configure_for_clang_and_qt_modern | |
run: | | |
mkdir $GITHUB_WORKSPACE/build | |
cd $GITHUB_WORKSPACE/build | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$(pwd)/installdir -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_PREFIX_PATH=/opt/qt515 .. | |
if: ${{ matrix.compiler_cpp == 'clang++' && matrix.qt_version == '5.15.4' }} | |
- name: Build and install | |
id: build_and_install | |
run: | | |
cd $GITHUB_WORKSPACE/build | |
cmake --build . --target all | |
cmake --build . --target install | |
- name: Upload QEverCloudGenerator artifact | |
id: upload_artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: QEverCloudGenerator_linux | |
path: '${{ github.workspace }}/build/installdir/bin/QEverCloudGenerator' | |
if: ${{ matrix.qt_version == '5.15.4' && matrix.compiler_cpp == 'g++' }} | |
build_macos: | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup cmake | |
uses: jwlawson/actions-setup-cmake@v1.13 | |
with: | |
cmake-version: '3.16.x' | |
- name: Setup ninja | |
env: | |
RUNNER_WORKSPACE: ${{ runner.workspace }} | |
run: | | |
mkdir -p $RUNNER_WORKSPACE/ninja | |
cd $RUNNER_WORKSPACE/ninja | |
curl -fsSL https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-mac.zip -o ninja-mac.zip | |
unzip ninja-mac.zip | |
echo "$RUNNER_WORKSPACE/ninja" >> $GITHUB_PATH | |
- name: Cache Qt 5.15.2 | |
id: cache_qt5 | |
uses: actions/cache@v3 | |
with: | |
path: '${{ runner.workspace }}/Qt5' | |
key: ${{ runner.os }}-Qt5Cache | |
- name: Install Qt 5.15.2 | |
id: install_qt5 | |
uses: jurplel/install-qt-action@v3 | |
with: | |
cache: true | |
cache-key-prefix: ${{ runner.os }}-Qt5Cache | |
version: 5.15.2 | |
host: mac | |
target: desktop | |
install-deps: true | |
arch: clang_64 | |
dir: '${{ runner.workspace }}/Qt5' | |
- name: Build and install | |
id: build_and_install | |
env: | |
RUNNER_WORKSPACE: ${{ runner.workspace }} | |
run: | | |
mkdir $GITHUB_WORKSPACE/build | |
cd $GITHUB_WORKSPACE/build | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$(pwd)/installdir -DCMAKE_PREFIX_PATH=$RUNNER_WORKSPACE/Qt5/Qt/5.15.2/clang_64 .. | |
cmake --build . --target all | |
cmake --build . --target install | |
- name: Upload QEverCloudGenerator artifact | |
id: upload_artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: QEverCloudGenerator_macos | |
path: ${{ github.workspace }}/build/installdir/bin/QEverCloudGenerator | |
build_windows: | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
include: | |
- target_arch: 'x86' | |
- target_arch: 'x64' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache Qt 5.15.2 x86 | |
id: cache_qt_x86 | |
uses: actions/cache@v3 | |
with: | |
path: '${{ runner.workspace }}/Qt_x86' | |
key: ${{ runner.os }}-QtCache-x86 | |
if: ${{ matrix.target_arch == 'x86' }} | |
- name: Install Qt 5.15.2 x86 | |
id: install_qt_modern_x86 | |
uses: jurplel/install-qt-action@v3 | |
with: | |
cache: true | |
cache-key-prefix: ${{ runner.os }}-QtCache-x86-1 | |
version: 5.15.2 | |
host: windows | |
target: desktop | |
install-deps: true | |
arch: win32_msvc2019 | |
dir: '${{ runner.workspace }}/Qt_x86' | |
if: ${{ matrix.target_arch == 'x86' }} | |
- name: Cache Qt 5.15.2 x64 | |
id: cache_qt_x64 | |
uses: actions/cache@v3 | |
with: | |
path: '${{ runner.workspace }}/Qt_x64' | |
key: ${{ runner.os }}-QtCache-x64 | |
if: ${{ matrix.target_arch == 'x64' }} | |
- name: Install Qt 5.15.2 x64 | |
id: install_qt_modern_x64 | |
uses: jurplel/install-qt-action@v3 | |
with: | |
cache: true | |
cache-key-prefix: ${{ runner.os }}-QtCache-x64-1 | |
version: 5.15.2 | |
host: windows | |
target: desktop | |
install-deps: true | |
arch: win64_msvc2019_64 | |
dir: '${{ runner.workspace }}/Qt_x64' | |
if: ${{ matrix.target_arch == 'x64' }} | |
- name: Build and install x86 | |
id: build_and_install_x86 | |
run: | | |
set CMAKE_PREFIX_PATH="%RUNNER_WORKSPACE%\Qt_x86\Qt\5.15.2\win32_msvc2019" | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 | |
cd %GITHUB_WORKSPACE% | |
md build | |
cd build | |
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="%GITHUB_WORKSPACE%\build\installdir" -DCMAKE_PREFIX_PATH="%CMAKE_PREFIX_PATH%" .. | |
cmake --build . --target all | |
cmake --build . --target install | |
if: ${{ matrix.target_arch == 'x86' }} | |
shell: cmd | |
- name: Build and install x64 | |
id: build_and_install_x64 | |
run: | | |
set CMAKE_PREFIX_PATH="%RUNNER_WORKSPACE%\Qt_x64\Qt\5.15.2\win64_msvc2019_x64" | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
cd %GITHUB_WORKSPACE% | |
md build | |
cd build | |
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="%GITHUB_WORKSPACE%\build\installdir" -DCMAKE_PREFIX_PATH="%CMAKE_PREFIX_PATH%" .. | |
cmake --build . --target all | |
cmake --build . --target install | |
if: ${{ matrix.target_arch == 'x64' }} | |
shell: cmd | |
- name: Upload x86 QEverCloudGenerator | |
id: upload_artifact_x86 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: QEverCloudGenerator_windows_x86 | |
path: '${{ github.workspace }}\build\installdir\bin\QEverCloudGenerator.exe' | |
if: ${{ matrix.target_arch == 'x86' }} | |
- name: Upload x64 QEverCloudGenerator | |
id: upload_artifact_x64 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: QEverCloudGenerator_windows_x64 | |
path: '${{ github.workspace }}\build\installdir\bin\QEverCloudGenerator.exe' | |
if: ${{ matrix.target_arch == 'x64' }} | |
create_new_release: | |
if: ${{ github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]') }} | |
runs-on: ubuntu-latest | |
needs: [build_linux, build_macos, build_windows] | |
steps: | |
- name: Install dependencies | |
id: install_deps | |
run: | | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 23F3D4EA75716059 | |
type -p curl >/dev/null || sudo apt install curl -y | |
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg | |
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ | |
sudo apt update | |
sudo apt install -qq gh | |
sudo apt install -qq jq | |
sudo apt install -qq p7zip | |
sudo apt install -qq curl | |
- name: Delete previous continuous release | |
id: delete_previous_continuous_release | |
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/development' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
export BRANCH_NAME=$(echo $GITHUB_REF | sed 's/.*\/\(.*\)$/\1/') | |
gh api /repos/d1vanov/QEverCloudGenerator/releases/tags/continuous-${BRANCH_NAME} > /tmp/gh_get_release.json && exit_status=$? || exit_status=$? | |
if [ "${exit_status}" = 0 ]; then | |
export COMMIT_SHA=$(cat /tmp/gh_get_release.json | jq '.target_commitish'); | |
if ! [ "${COMMIT_SHA}" = "${GITHUB_SHA}" ]; then | |
export PREVIOUS_CONTINUOUS_RELEASE_DELETED=0 | |
for i in {1..10} | |
do | |
echo "Trying to delete previous continuous release continuous-${BRANCH_NAME}" | |
gh release delete continuous-${BRANCH_NAME} -y -R d1vanov/QEverCloudGenerator; | |
curl -X DELETE -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/d1vanov/QEverCloudGenerator/git/refs/tags/continuous-${BRANCH_NAME}; | |
gh api /repos/d1vanov/QEverCloudGenerator/releases/tags/continuous-${BRANCH_NAME} > /tmp/gh_get_release.json && exit_status=$? || exit_status=$? | |
if [ "${exit_status}" != 0 ]; then | |
echo "It appears that previous continuous release is deleted now" | |
export PREVIOUS_CONTINUOUS_RELEASE_DELETED=1 | |
break | |
fi | |
echo "Was able to receive information about the attempted to be deleted previous continuous release, waiting for 5 seconds before the next attempt" | |
sleep 5 | |
done | |
if [ "$PREVIOUS_CONTINUOUS_RELEASE_DELETED" != "1" ]; then | |
echo "Failed to delete previous continuous release after several attempts!" | |
fi | |
fi | |
fi | |
shell: bash | |
- name: Create new continuous master release | |
id: create_new_continuous_master_release | |
if: ${{ github.ref == 'refs/heads/master' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create continuous-master --draft=false --prerelease --title "Continuous build (continuous-master)" --target $GITHUB_SHA -R d1vanov/QEverCloudGenerator | |
- name: Create new continuous development release | |
id: create_new_continuous_development_release | |
if: ${{ github.ref == 'refs/heads/development' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create continuous-development --draft=false --prerelease --title "Continuous build (continuous-development)" --target $GITHUB_SHA -R d1vanov/QEverCloudGenerator | |
- name: Create new tagged release | |
id: create_new_tagged_release | |
if: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/development' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REF: ${{ github.ref }} | |
GITHUB_REF_NAME: ${{ github.ref_name }} | |
run: | | |
gh release create "$GITHUB_REF" --draft=false --title "Release build ($GITHUB_REF_NAME)" --target $GITHUB_SHA -R d1vanov/QEverCloudGenerator | |
- name: Download linux artifact | |
id: download_linux_artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: QEverCloudGenerator_linux | |
path: '${{ github.workspace }}/artifacts/linux/QEverCloudGenerator' | |
- name: Download macOS artifact | |
id: download_macos_artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: QEverCloudGenerator_macos | |
path: '${{ github.workspace }}/artifacts/macos/QEverCloudGenerator' | |
- name: Download Windows x86 artifact | |
id: download_windows_x86_artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: QEverCloudGenerator_windows_x86 | |
path: '${{ github.workspace }}/artifacts/windows/x86/QEverCloudGenerator.exe' | |
- name: Download Windows x64 artifact | |
id: download_windows_x64_artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: QEverCloudGenerator_windows_x64 | |
path: '${{ github.workspace }}/artifacts/windows/x64/QEverCloudGenerator.exe' | |
- name: Compress Linux artifact | |
id: compress_linux_artifact | |
run: | | |
7z a $GITHUB_WORKSPACE/artifacts/linux/QEverCloudGenerator.zip $GITHUB_WORKSPACE/artifacts/linux/QEverCloudGenerator | |
- name: Compress macOS artifact | |
id: compress_macos_artifact | |
run: | | |
7z a $GITHUB_WORKSPACE/artifacts/macos/QEverCloudGenerator.zip $GITHUB_WORKSPACE/artifacts/macos/QEverCloudGenerator | |
- name: Compress Windows x86 artifact | |
id: compress_windows_x86_artifact | |
run: | | |
7z a $GITHUB_WORKSPACE/artifacts/windows/x86/QEverCloudGenerator.zip $GITHUB_WORKSPACE/artifacts/windows/x86/QEverCloudGenerator.exe | |
- name: Compress Windows x64 artifact | |
id: compress_windows_x64_artifact | |
run: | | |
7z a $GITHUB_WORKSPACE/artifacts/windows/x64/QEverCloudGenerator.zip $GITHUB_WORKSPACE/artifacts/windows/x64/QEverCloudGenerator.exe | |
- name: Upload Linux artifact to continuous master release | |
id: upload_linux_artifact_to_continuous_master_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mv $GITHUB_WORKSPACE/artifacts/linux/QEverCloudGenerator.zip /tmp/QEverCloudGenerator_linux_x86_64.zip | |
for i in 0..3 | |
do | |
export UPLOADED=0 | |
gh release upload --clobber continuous-master /tmp/QEverCloudGenerator_linux_x86_64.zip -R d1vanov/QEverCloudGenerator && export UPLOADED=1 || true | |
if [ "$UPLOADED" = "1" ]; then | |
break | |
fi | |
done | |
if [ "$UPLOADED" != "1" ]; then | |
echo "Failed to upload artifact to release" | |
exit 1 | |
fi | |
if: ${{ github.ref == 'refs/heads/master' }} | |
shell: bash | |
- name: Upload Linux artifact to continuous development release | |
id: upload_linux_artifact_to_continuous_development_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mv $GITHUB_WORKSPACE/artifacts/linux/QEverCloudGenerator.zip /tmp/QEverCloudGenerator_linux_x86_64.zip | |
for i in 0..3 | |
do | |
export UPLOADED=0 | |
gh release upload --clobber continuous-development /tmp/QEverCloudGenerator_linux_x86_64.zip -R d1vanov/QEverCloudGenerator && export UPLOADED=1 || true | |
if [ "$UPLOADED" = "1" ]; then | |
break | |
fi | |
done | |
if [ "$UPLOADED" != "1" ]; then | |
echo "Failed to upload artifact to release" | |
exit 1 | |
fi | |
if: ${{ github.ref == 'refs/heads/development' }} | |
shell: bash | |
- name: Upload macOS artifact to continuous master release | |
id: upload_macos_artifact_to_continuous_master_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mv $GITHUB_WORKSPACE/artifacts/macos/QEverCloudGenerator.zip /tmp/QEverCloudGenerator_macos_x86_64.zip | |
for i in 0..3 | |
do | |
export UPLOADED=0 | |
gh release upload --clobber continuous-master /tmp/QEverCloudGenerator_macos_x86_64.zip -R d1vanov/QEverCloudGenerator && export UPLOADED=1 || true | |
if [ "$UPLOADED" = "1" ]; then | |
break | |
fi | |
done | |
if [ "$UPLOADED" != "1" ]; then | |
echo "Failed to upload artifact to release" | |
exit 1 | |
fi | |
if: ${{ github.ref == 'refs/heads/master' }} | |
shell: bash | |
- name: Upload macOS artifact to continuous development release | |
id: upload_macos_artifact_to_continuous_development_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mv $GITHUB_WORKSPACE/artifacts/macos/QEverCloudGenerator.zip /tmp/QEverCloudGenerator_macos_x86_64.zip | |
for i in 0..3 | |
do | |
export UPLOADED=0 | |
gh release upload --clobber continuous-development /tmp/QEverCloudGenerator_macos_x86_64.zip -R d1vanov/QEverCloudGenerator && export UPLOADED=1 || true | |
if [ "$UPLOADED" = "1" ]; then | |
break | |
fi | |
done | |
if [ "$UPLOADED" != "1" ]; then | |
echo "Failed to upload artifact to release" | |
exit 1 | |
fi | |
if: ${{ github.ref == 'refs/heads/development' }} | |
shell: bash | |
- name: Upload Windows x86 artifact to continuous master release | |
id: upload_windows_x86_artifact_to_continuous_master_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mv $GITHUB_WORKSPACE/artifacts/windows/x86/QEverCloudGenerator.zip /tmp/QEverCloudGenerator_windows_x86.zip | |
for i in 0..3 | |
do | |
export UPLOADED=0 | |
gh release upload --clobber continuous-master /tmp/QEverCloudGenerator_windows_x86.zip -R d1vanov/QEverCloudGenerator && export UPLOADED=1 || true | |
if [ "$UPLOADED" = "1" ]; then | |
break | |
fi | |
done | |
if [ "$UPLOADED" != "1" ]; then | |
echo "Failed to upload artifact to release" | |
exit 1 | |
fi | |
if: ${{ github.ref == 'refs/heads/master' }} | |
shell: bash | |
- name: Upload Windows x86 artifact to continuous development release | |
id: upload_windows_x86_artifact_to_continuous_development_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mv $GITHUB_WORKSPACE/artifacts/windows/x86/QEverCloudGenerator.zip /tmp/QEverCloudGenerator_windows_x86.zip | |
for i in 0..3 | |
do | |
export UPLOADED=0 | |
gh release upload --clobber continuous-development /tmp/QEverCloudGenerator_windows_x86.zip -R d1vanov/QEverCloudGenerator && export UPLOADED=1 || true | |
if [ "$UPLOADED" = "1" ]; then | |
break | |
fi | |
done | |
if [ "$UPLOADED" != "1" ]; then | |
echo "Failed to upload artifact to release" | |
exit 1 | |
fi | |
if: ${{ github.ref == 'refs/heads/development' }} | |
shell: bash | |
- name: Upload Windows x64 artifact to continuous master release | |
id: upload_windows_x64_artifact_to_continuous_master_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mv $GITHUB_WORKSPACE/artifacts/windows/x64/QEverCloudGenerator.zip /tmp/QEverCloudGenerator_windows_x64.zip | |
for i in 0..3 | |
do | |
export UPLOADED=0 | |
gh release upload --clobber continuous-master /tmp/QEverCloudGenerator_windows_x64.zip -R d1vanov/QEverCloudGenerator && export UPLOADED=1 || true | |
if [ "$UPLOADED" = "1" ]; then | |
break | |
fi | |
done | |
if [ "$UPLOADED" != "1" ]; then | |
echo "Failed to upload artifact to release" | |
exit 1 | |
fi | |
if: ${{ github.ref == 'refs/heads/master' }} | |
shell: bash | |
- name: Upload Windows x64 artifact to continuous development release | |
id: upload_windows_x64_artifact_to_continuous_development_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mv $GITHUB_WORKSPACE/artifacts/windows/x64/QEverCloudGenerator.zip /tmp/QEverCloudGenerator_windows_x64.zip | |
for i in 0..3 | |
do | |
export UPLOADED=0 | |
gh release upload --clobber continuous-development /tmp/QEverCloudGenerator_windows_x64.zip -R d1vanov/QEverCloudGenerator && export UPLOADED=1 || true | |
if [ "$UPLOADED" = "1" ]; then | |
break | |
fi | |
done | |
if [ "$UPLOADED" != "1" ]; then | |
echo "Failed to upload artifact to release" | |
exit 1 | |
fi | |
if: ${{ github.ref == 'refs/heads/development' }} | |
shell: bash | |
- name: Upload Linux artifact to tagged release | |
id: upload_linux_artifact_to_tagged_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
export TAG_NAME=$(echo $GITHUB_REF | sed 's/.*\/\(.*\)$/\1/') | |
mv $GITHUB_WORKSPACE/artifacts/linux/QEverCloudGenerator.zip /tmp/QEverCloudGenerator_linux_x86_64.zip | |
for i in 0..3 | |
do | |
export UPLOADED=0 | |
gh release upload --clobber ${TAG_NAME} /tmp/QEverCloudGenerator_linux_x86_64.zip -R d1vanov/QEverCloudGenerator && export UPLOADED=1 || true | |
if [ "$UPLOADED" = "1" ]; then | |
break | |
fi | |
done | |
if [ "$UPLOADED" != "1" ]; then | |
echo "Failed to upload artifact to release" | |
exit 1 | |
fi | |
if: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/development' }} | |
shell: bash | |
- name: Upload macOS artifact to tagged release | |
id: upload_macos_artifact_to_tagged_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
export TAG_NAME=$(echo $GITHUB_REF | sed 's/.*\/\(.*\)$/\1/') | |
mv $GITHUB_WORKSPACE/artifacts/macos/QEverCloudGenerator.zip /tmp/QEverCloudGenerator_macos_x86_64.zip | |
for i in 0..3 | |
do | |
export UPLOADED=0 | |
gh release upload --clobber ${TAG_NAME} /tmp/QEverCloudGenerator_macos_x86_64.zip -R d1vanov/QEverCloudGenerator && export UPLOADED=1 || true | |
if [ "$UPLOADED" = "1" ]; then | |
break | |
fi | |
done | |
if [ "$UPLOADED" != "1" ]; then | |
echo "Failed to upload artifact to release" | |
exit 1 | |
fi | |
if: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/development' }} | |
shell: bash | |
- name: Upload Windows x86 artifact to tagged release | |
id: upload_windows_x86_artifact_to_tagged_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
export TAG_NAME=$(echo $GITHUB_REF | sed 's/.*\/\(.*\)$/\1/') | |
mv $GITHUB_WORKSPACE/artifacts/windows/x86/QEverCloudGenerator.zip /tmp/QEverCloudGenerator_windows_x86.zip | |
for i in 0..3 | |
do | |
export UPLOADED=0 | |
gh release upload --clobber ${TAG_NAME} /tmp/QEverCloudGenerator_windows_x86.zip -R d1vanov/QEverCloudGenerator && export UPLOADED=1 || true | |
if [ "$UPLOADED" = "1" ]; then | |
break | |
fi | |
done | |
if [ "$UPLOADED" != "1" ]; then | |
echo "Failed to upload artifact to release" | |
exit 1 | |
fi | |
if: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/development' }} | |
shell: bash | |
- name: Upload Windows x64 artifact to tagged release | |
id: upload_windows_x64_artifact_to_tagged_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
export TAG_NAME=$(echo $GITHUB_REF | sed 's/.*\/\(.*\)$/\1/') | |
mv $GITHUB_WORKSPACE/artifacts/windows/x64/QEverCloudGenerator.zip /tmp/QEverCloudGenerator_windows_x64.zip | |
for i in 0..3 | |
do | |
export UPLOADED=0 | |
gh release upload --clobber ${TAG_NAME} /tmp/QEverCloudGenerator_windows_x64.zip -R d1vanov/QEverCloudGenerator && export UPLOADED=1 || true | |
if [ "$UPLOADED" = "1" ]; then | |
break | |
fi | |
done | |
if [ "$UPLOADED" != "1" ]; then | |
echo "Failed to upload artifact to release" | |
exit 1 | |
fi | |
if: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/development' }} | |
shell: bash |