Repository navigation
60 lines (47 loc) · 1.51 KB
/
Copy pathrelease.yml
File metadata and controls
60 lines (47 loc) · 1.51 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build and Package
on:
push:
branches: [main]
jobs:
build:
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Install Ninja
run: choco install ninja -y
- name: Cache vcpkg
uses: actions/cache@v4
with:
path: ~/.vcpkg
key: vcpkg-${{ hashFiles('vcpkg.json') }}
restore-keys: vcpkg-
- name: Cache build
uses: actions/cache@v4
with:
path: build/x64-Release
key: build-${{ github.sha }}
restore-keys: build-
- name: Bootstrap vcpkg
run: External\vcpkg\bootstrap-vcpkg.bat
- name: Configure
run: cmake --preset x64-Release
- name: Build
run: cmake --build build/x64-Release
- name: Package
run: Compress-Archive -Path build/x64-Release/HitmanAbsolutionEditor.exe,build/x64-Release/*.dll,build/x64-Release/assets,build/x64-Release/Tools -DestinationPath HitmanAbsolutionEditor.zip
- name: Get short SHA
id: sha
run: echo "short=$(${env:GITHUB_SHA}.Substring(0, 7))" >> $env:GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: build-${{ steps.sha.outputs.short }}
name: Build ${{ steps.sha.outputs.short }}
files: HitmanAbsolutionEditor.zip