From 9fcc5d894c11a8b8d29f716de0dabc533293ff16 Mon Sep 17 00:00:00 2001 From: Christoph Schulz Date: Fri, 17 May 2024 13:53:56 +0200 Subject: [PATCH] Add Build and Release GithHub Actions Added GitHub action for building and releasing when a version tag is added. --- .github/workflows/build-release.yaml | 58 ++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/build-release.yaml diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml new file mode 100644 index 0000000..0787a51 --- /dev/null +++ b/.github/workflows/build-release.yaml @@ -0,0 +1,58 @@ + +name: Build and Release + +on: + push: + tags: [ 'v*.*.*' ] + +jobs: + build-windows: + runs-on: windows-2019 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Install CUDA + uses: Jimver/cuda-toolkit@v0.2.15 + with: + cuda: '12.4.1' + - name: Install Qt + uses: jurplel/install-qt-action@v3.3.0 + with: + version: '6.7.0' + - name: Configure and build with CMake + run: | + mkdir build + cd build + cmake .. + cmake --build . --config Release + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: windows-artifact + path: | + build/playground/Release/ + !build/playground/Release/*.lib + !build/playground/Release/*.exp + LICENSE.txt + + release: + runs-on: ubuntu-22.04 + needs: [ build-windows ] + if: startsWith(github.ref, 'refs/tags/') + steps: + - name: Download artifact (Windows) + uses: actions/download-artifact@v4 + with: + name: windows-artifact + path: windows + - name: Zip artifact (Windows) + run: | + cd windows/ + mv build/playground/Release/* ./ + rm -rf build/playground/Release/ + zip -r ../MLBGStippling-Windows.zip ./ + - name: Push release + uses: softprops/action-gh-release@v2 + with: + files: | + MLBGStippling-Windows.zip