-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (43 loc) · 1.14 KB
/
cmake_build.yml
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
45
46
47
48
49
50
51
name: CMake
on:
push:
branches: [ main ]
tags:
- 'v[0-9]+.*'
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- 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: Create Release Zip
run: |
mkdir primewatch2
cp -r prime_defs/ primewatch2/
cp build/${{env.BUILD_TYPE}}/primewatch2.exe primewatch2/
tar -a -c -f primewatch2.zip primewatch2
- name: Upload Arifacts
uses: actions/upload-artifact@v3
with:
name: primewatch2
path: primewatch2/**
if-no-files-found: error
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
files: primewatch2.zip
body: Automated release build