-
Notifications
You must be signed in to change notification settings - Fork 45
121 lines (101 loc) · 4.03 KB
/
Copy pathwindows.yml
File metadata and controls
121 lines (101 loc) · 4.03 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: windows
on:
push:
tags:
- "v*"
pull_request:
tags:
- "v*"
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release
jobs:
build:
runs-on: windows-2022
if: github.repository == 'hzqst/MetaHookSv'
steps:
- uses: hzqst/checkout@v2.3.4
with:
submodules: true
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Build MetaHook
working-directory: ${{env.GITHUB_WORKSPACE}}
run: scripts\build-MetaHook.bat
shell: cmd
- name: Build Plugins
working-directory: ${{env.GITHUB_WORKSPACE}}
run: scripts\build-Plugins.bat
shell: cmd
- name: Checkout BetterSpray
uses: hzqst/checkout@v2.3.4
with:
repository: hzqst/BetterSpray
path: BetterSpray
submodules: true
- name: Build BetterSpray
working-directory: BetterSpray
run: msbuild /m /p:Configuration=Release /t:BetterSpray
shell: cmd
- name: Merge BetterSpray Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: xcopy "BetterSpray\Build\*" "Build\" /y /e
shell: cmd
- name: Create Build-Output directory
working-directory: ${{env.GITHUB_WORKSPACE}}
run: mkdir Build-Output
shell: cmd
- name: Copy Build to Build-Output
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
mkdir "Build-Output\Build"
xcopy "Build" "Build-Output\Build" /y /e
if exist "Build-Output\Build\svencoop\metahook\dlls\.placeholder" del "Build-Output\Build\svencoop\metahook\dlls\.placeholder"
if exist "Build-Output\Build\svencoop\metahook\plugins\.placeholder" del "Build-Output\Build\svencoop\metahook\plugins\.placeholder"
shell: cmd
- name: Build and Publish MetahookInstaller
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
dotnet publish toolsrc/MetahookInstaller/MetahookInstallerAvalonia.Desktop/MetahookInstallerAvalonia.Desktop.csproj -p:PublishProfile=FolderProfile
echo .pdb > exclude.txt
ren "toolsrc\MetahookInstaller\MetahookInstallerAvalonia.Desktop\bin\Release\net8.0\publish\win-x64\MetahookInstallerAvalonia.Desktop.exe" "MetahookInstaller.exe"
xcopy "toolsrc\MetahookInstaller\MetahookInstallerAvalonia.Desktop\bin\Release\net8.0\publish\win-x64\*" "Build-Output\" /y /e /EXCLUDE:exclude.txt
shell: cmd
- name: Copy SteamAppsLocation to Build-Output
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
mkdir "Build-Output\tools"
copy "tools\SteamAppsLocation.exe" "Build-Output\tools" /y
copy "tools\steam_appid.txt" "Build-Output\tools" /y
copy "tools\steam_api.dll" "Build-Output\tools" /y
shell: cmd
- name: Copy install bat to Build-Output
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
mkdir "Build-Output\scripts"
copy "scripts\install-*.bat" "Build-Output\scripts" /y
shell: cmd
- name: Zipping All
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
7z a MetaHookSv-windows-x86.7z "Build-Output/*" -r
shell: cmd
- name: Zipping PDB
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
7z a MetaHookSv-windows-x86-debug-info.7z "output/x86/*" -r ^
-x!*.lib ^
-x!*.exp
shell: cmd
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: MetaHookSv-${{ github.ref }}
files: |
MetaHookSv-windows-x86.7z
MetaHookSv-windows-x86-debug-info.7z