-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (62 loc) · 1.83 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
name: C/C++ CI
on:
push:
pull_request:
env:
VCPKG_COMMIT: cc97b4536ae749ec0e4f643488b600b217540fb3
VCPKG_DIR: C:/deps/vcpkg
CMAKE_PRESET: ninja-msvc-vcpkg
jobs:
job_build_cpp:
name: win
runs-on: windows-latest
steps:
# Checkout
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
# Setup MSVC
- uses: ilammy/msvc-dev-cmd@v1
with:
vsversion: 2022
toolset: 14
# Install latest CMake
- uses: lukka/get-cmake@latest
- name: Create folder
run: |
mkdir ${{ env.VCPKG_DIR }}
# Setup vcpkg and build deps
- name: Restore artifacts, or Run vcpkg, build and cache artifacts
uses: lukka/run-vcpkg@v11
id: runvcpkg
with:
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }}
vcpkgDirectory: ${{ env.VCPKG_DIR }}
- name: Run CMake consuming CMakePresets.json and vcpkg.json by mean of vcpkg.
uses: lukka/run-cmake@v10
with:
configurePreset: ninja-release-vcpkg-win
buildPreset: ninja-msvc-vcpkg-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.mod_name }}/
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: |
\@${{needs.job_build_cpp.outputs.modName}}.zip