-
Notifications
You must be signed in to change notification settings - Fork 2
78 lines (63 loc) · 2.04 KB
/
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: C/C++ CI
on:
push:
pull_request:
jobs:
job_build_cpp:
name: win
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
# Setup MSVC
- uses: ilammy/msvc-dev-cmd@v1
with:
vsversion: 2022
toolset: 14
- uses: lukka/get-cmake@latest
- name: Install Conan
id: conan
uses: turtlebrowser/get-conan@main
- name: Print conan version
run: echo "${{ steps.conan.outputs.version }}"
- name: cache ~/.conan2
id: cache-conan
uses: actions/cache@v2
env:
cache-name: cache-conan-modules
with:
path: ~/.conan2/
key: ${{ runner.os }}-builder-${{ env.cache-name }}-${{ hashFiles('conanfile.py') }}
restore-keys: ${{ runner.os }}-builder-${{ env.cache-name }}-
- name: Conan install
run: conan install . -s build_type=Release --output-folder=build --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja --profile:host=./ci-conan-profile --profile:build=./ci-conan-profile
- name: Create build dir
run: mkdir build/ninja-release-win
- name: Run CMake
run: |
cmake --preset ninja-release-win
cmake --build --preset ninja-msvc-release
# Build the mod
- uses: gruppe-adler/action-release-with-hemtt@v3
name: 'Build Mod with HEMTT'
id: build
# Upload the mod
- uses: actions/upload-artifact@v1
with:
name: ${{ steps.build.outputs.mod_name }}
path: ${{ steps.build.outputs.release_path }}
# zip it
- uses: papeloto/action-zip@v1
with:
files: ${{ steps.build.outputs.release_path }}
dest: \@${{ steps.build.outputs.mod_name }}.zip
# release it
- uses: "marvinpinto/action-automatic-releases@latest"
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
files: |
\@${{ steps.build.outputs.mod_name }}.zip