forked from praydog/REFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (46 loc) · 2.35 KB
/
c-cpp.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
name: Dev Release
on: [push, workflow_dispatch]
env:
BUILD_TYPE: Release
jobs:
dev-release:
runs-on: windows-latest
strategy:
matrix:
target: [RE2, RE2_TDB66, RE3, RE3_TDB67, RE4, RE7, RE7_TDB49, RE8, DMC5, MHRISE, SF6]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure CMake
run: cmake -S ${{github.workspace}} -B ${{github.workspace}}/build -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DDEVELOPER_MODE=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target ${{matrix.target}}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{matrix.target}}
path: ${{github.workspace}}/build/bin/${{matrix.target}}/dinput8.dll
if-no-files-found: error
- name: Compress release
run: |
echo ${{github.sha}} > ${{github.workspace}}/reframework_revision.txt
echo none > ${{github.workspace}}/DELETE_OPENVR_API_DLL_IF_YOU_WANT_TO_USE_OPENXR
7z a ${{github.workspace}}/${{matrix.target}}.zip ${{github.workspace}}/reframework_revision.txt
7z a ${{github.workspace}}/${{matrix.target}}.zip ${{github.workspace}}/DELETE_OPENVR_API_DLL_IF_YOU_WANT_TO_USE_OPENXR
7z a ${{github.workspace}}/${{matrix.target}}.zip ${{github.workspace}}/build/bin/${{matrix.target}}/dinput8.dll
7z a ${{github.workspace}}/${{matrix.target}}.zip ${{github.workspace}}/dependencies/openvr/bin/win64/openvr_api.dll
7z a ${{github.workspace}}/${{matrix.target}}.zip ${{github.workspace}}/build/_deps/openxr-build/src/loader/${{env.BUILD_TYPE}}/openxr_loader.dll
7z a ${{github.workspace}}/${{matrix.target}}.zip ${{github.workspace}}/scripts
7z rn ${{github.workspace}}/${{matrix.target}}.zip scripts reframework/autorun
- name: Set output
id: vars
run: echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Release
if: github.ref == 'refs/heads/master'
uses: softprops/[email protected]
with:
name: ${{format('v1.{0}-{1}', github.run_number, steps.vars.outputs.SHA_SHORT)}}
tag_name: latest
files: ${{github.workspace}}/${{matrix.target}}.zip