Skip to content

Add github action

Add github action #5

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/*