-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Build and Release GithHub Actions
Added GitHub action for building and releasing when a version tag is added.
- Loading branch information
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
with: | ||
cuda: '12.4.1' | ||
- name: Install Qt | ||
uses: jurplel/[email protected] | ||
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 |