Skip to content

Commit f9f7688

Browse files
committed
Add GitHub Actions workflow to build Windows release DLLs
Uses the pre-installed Visual Studio 2022 Enterprise and vcpkg on windows-latest runners. Installs protobuf for x86 and x64, generates the protobuf C++ sources, then builds steam_api.dll and steam_api64.dll and uploads them as artifacts.
1 parent ca39258 commit f9f7688

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build Windows Release
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-windows:
12+
runs-on: windows-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Install protobuf (x86 and x64)
19+
shell: pwsh
20+
run: |
21+
$vcpkgRoot = $env:VCPKG_INSTALLATION_ROOT
22+
& "$vcpkgRoot\bootstrap-vcpkg.bat"
23+
& "$vcpkgRoot\vcpkg.exe" install protobuf:x86-windows-static protobuf:x64-windows-static
24+
25+
- name: Generate protobuf sources
26+
shell: pwsh
27+
run: |
28+
$protoc = "$env:VCPKG_INSTALLATION_ROOT\packages\protobuf_x64-windows-static\tools\protobuf\protoc.exe"
29+
& $protoc -I.\dll\ --cpp_out=.\dll\ .\dll\net.proto
30+
31+
- name: Build release DLLs
32+
shell: cmd
33+
run: |
34+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86
35+
cl dll/rtlgenrandom.c dll/rtlgenrandom.def
36+
cl /LD /DEMU_RELEASE_BUILD /DNDEBUG /I%VCPKG_INSTALLATION_ROOT%\packages\protobuf_x86-windows-static\include\ dll/*.cpp dll/*.cc %VCPKG_INSTALLATION_ROOT%\packages\protobuf_x86-windows-static\lib\libprotobuf-lite.lib Iphlpapi.lib Ws2_32.lib rtlgenrandom.lib Shell32.lib /EHsc /MP12 /Ox /link /debug:none /OUT:steam_api.dll
37+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
38+
cl dll/rtlgenrandom.c dll/rtlgenrandom.def
39+
cl /LD /DEMU_RELEASE_BUILD /DNDEBUG /I%VCPKG_INSTALLATION_ROOT%\packages\protobuf_x64-windows-static\include\ dll/*.cpp dll/*.cc %VCPKG_INSTALLATION_ROOT%\packages\protobuf_x64-windows-static\lib\libprotobuf-lite.lib Iphlpapi.lib Ws2_32.lib rtlgenrandom.lib Shell32.lib /EHsc /MP12 /Ox /link /debug:none /OUT:steam_api64.dll
40+
41+
- name: Upload artifacts
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: steam-api-dlls
45+
path: |
46+
steam_api.dll
47+
steam_api64.dll
48+
Readme_release.txt
49+
files_example

0 commit comments

Comments
 (0)