-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (51 loc) · 1.67 KB
/
build-windows.yaml
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
52
53
54
name: Build Windows
on:
workflow_dispatch:
inputs:
version:
description: "The version number"
type: string
workflow_call:
inputs:
version:
description: "The version number"
type: string
outputs:
artifact:
description: "The artifact that was built"
value: ${{ jobs.build-windows.outputs.artifact }}
jobs:
build-windows:
runs-on: windows-2022
env:
CHRISTIAN_VERSION: ${{ inputs.version }}
outputs:
artifact: ${{ steps.uploaded.outputs.artifact }}
steps:
# https://github.com/actions/checkout
- name: checkout source
uses: actions/checkout@v4
with:
submodules: 'recursive'
# https://stackoverflow.com/questions/5879076/how-to-create-a-batch-file-for-visual-studio-command-prompt
- name: build
run: |
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x86_amd64
cmake --preset windows-x64-debug
cmake --build --preset windows-x64-debug
cpack -G WIX --config out/build/windows-x64-debug/CPackConfig.cmake
mkdir Windows
7z a -tzip -mx=9 Windows\\ChristiansSteamBot.zip .\\out\\build\\windows-x64-debug\\ChristiansSteamBot.exe
copy ChristiansSteamBot*.msi Windows
shell: cmd
# https://github.com/actions/upload-artifact
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: Windows
path: Windows
overwrite: true
retention-days: 1
- name: produce outputs
id: uploaded
run: echo "artifact=Windows" >> $GITHUB_OUTPUT