Add github action #5
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: CMake | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
BUILD_TYPE: Release | |
defaults: | |
run: | |
shell: pwsh | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Prepare artifacts | |
run: | | |
New-Item -Type Directory ./artifacts | |
Move-Item ./build/bin/vsd.exe ./artifacts/ | |
Move-Item ./src/vsd.conf ./artifacts/ | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vsd-${{ github.head_ref }}.${{ github.sha }} | |
path: ./artifacts/* |