-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.03 KB
/
build.yml
File metadata and controls
44 lines (35 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build Windows
on:
push:
branches: [ $default-branch ]
tags:
- v*
pull_request:
branches: [ $default-branch ]
env:
BUILD_TYPE: Release
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: Get Artifacts
uses: actions/upload-artifact@v4
with:
name: executable
path: ${{github.workspace}}/build/Release/CppDiscType.exe
- name: Turn slashes
if: startsWith(github.ref, 'refs/tags/')
run: |
$Path = "${{github.workspace}}" -replace '\\','/'
echo $PATH
echo "WORKSPACE_PATH=$Path" >> $env:GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{env.WORKSPACE_PATH}}/build/Release/CppDiscType.exe