Skip to content

Commit 0414ed6

Browse files
committed
\n
1 parent f2b1577 commit 0414ed6

1 file changed

Lines changed: 112 additions & 112 deletions

File tree

.github/workflows/release.yml

Lines changed: 112 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,112 @@
1-
name: Build and Release DLLs
2-
3-
on:
4-
push:
5-
branches:
6-
- main
7-
- refactor-uco2-v120
8-
tags:
9-
- "v*.*.*"
10-
workflow_dispatch:
11-
12-
permissions:
13-
contents: write
14-
15-
jobs:
16-
build-release:
17-
name: Build and Release
18-
runs-on: windows-2022
19-
20-
steps:
21-
- name: Check out repo
22-
uses: actions/checkout@v4
23-
24-
- name: Set up MSBuild
25-
uses: microsoft/setup-msbuild@v2
26-
27-
- name: Build x86 version (steam_api.dll)
28-
run: msbuild uc_online2.vcxproj -p:Configuration=Release -p:Platform=Win32 -m
29-
30-
- name: Build x64 version (steam_api64.dll)
31-
run: msbuild uc_online2.vcxproj -p:Configuration=Release -p:Platform=x64 -m
32-
33-
- name: Build x86 version debug (steam_api.dll)
34-
run: msbuild uc_online2.vcxproj -p:Configuration=Debug -p:Platform=Win32 -m
35-
36-
- name: Build x64 version debug (steam_api64.dll)
37-
run: msbuild uc_online2.vcxproj -p:Configuration=Debug -p:Platform=x64 -m
38-
39-
- name: Verify build outputs
40-
shell: pwsh
41-
run: |
42-
$files = @(
43-
"relbuild/x86/steam_api.dll",
44-
"relbuild/x64/steam_api64.dll"
45-
"debbuild/x86/steam_api.dll"
46-
"debbuild/x64/steam_api64.dll"
47-
)
48-
49-
foreach ($file in $files) {
50-
if (-not (Test-Path $file)) {
51-
throw "Missing expected build output: $file"
52-
}
53-
}
54-
55-
- name: Package release zip
56-
shell: pwsh
57-
run: |
58-
$packageRootrel = "dist/uc-online2-${{ github.ref_name }}-release"
59-
$archivePathrel = "$packageRootrel.zip"
60-
61-
New-Item -ItemType Directory -Path "$packageRootrel/x86" -Force | Out-Null
62-
New-Item -ItemType Directory -Path "$packageRootrel/x64" -Force | Out-Null
63-
64-
Copy-Item "relbuild/x86/steam_api.dll" "$packageRootrel/x86/steam_api.dll"
65-
Copy-Item "relbuild/x64/steam_api64.dll" "$packageRootrel/x64/steam_api64.dll"
66-
67-
if (Test-Path $archivePathrel) {
68-
Remove-Item $archivePathrel -Force
69-
}
70-
71-
Compress-Archive -Path $packageRootrel -DestinationPath $archivePathrel
72-
73-
- name: Package debug zip
74-
shell: pwsh
75-
run: |
76-
$packageRootdeb = "dist/uc-online2-${{ github.ref_name }}-debug"
77-
$archivePathdeb = "$packageRootdeb.zip"
78-
79-
New-Item -ItemType Directory -Path "$packageRootdeb/x86" -Force | Out-Null
80-
New-Item -ItemType Directory -Path "$packageRootdeb/x64" -Force | Out-Null
81-
82-
Copy-Item "debbuild/x86/steam_api.dll" "$packageRootdeb/x86/steam_api.dll"
83-
Copy-Item "debbuild/x64/steam_api64.dll" "$packageRootdeb/x64/steam_api64.dll"
84-
85-
if (Test-Path $archivePathdeb) {
86-
Remove-Item $archivePathdeb -Force
87-
}
88-
89-
Compress-Archive -Path $packageRootdeb -DestinationPath $archivePathdeb
90-
91-
- name: Upload workflow artifact
92-
uses: actions/upload-artifact@v4
93-
with:
94-
name: |
95-
uc-online2-${{ github.ref_name }}-release
96-
uc-online2-${{ github.ref_name }}-debug
97-
path: |
98-
dist/uc-online2-${{ github.ref_name }}-release.zip
99-
dist/uc-online2-${{ github.ref_name }}-debug.zip
100-
if-no-files-found: error
101-
102-
- name: Publish release assets
103-
if: startsWith(github.ref, 'refs/tags/')
104-
uses: softprops/action-gh-release@v2
105-
with:
106-
tag_name: ${{ github.ref_name }}
107-
name: ${{ github.ref_name }}
108-
files: |
109-
dist/uc-online2-${{ github.ref_name }}-release.zip
110-
dist/uc-online2-${{ github.ref_name }}-debug.zip
111-
generate_release_notes: true
112-
fail_on_unmatched_files: true
1+
name: Build and Release DLLs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- refactor-uco2-v120
8+
tags:
9+
- "v*.*.*"
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
build-release:
17+
name: Build and Release
18+
runs-on: windows-2022
19+
20+
steps:
21+
- name: Check out repo
22+
uses: actions/checkout@v4
23+
24+
- name: Set up MSBuild
25+
uses: microsoft/setup-msbuild@v2
26+
27+
- name: Build x86 version (steam_api.dll)
28+
run: msbuild uc_online2.vcxproj -p:Configuration=Release -p:Platform=Win32 -m
29+
30+
- name: Build x64 version (steam_api64.dll)
31+
run: msbuild uc_online2.vcxproj -p:Configuration=Release -p:Platform=x64 -m
32+
33+
- name: Build x86 version debug (steam_api.dll)
34+
run: msbuild uc_online2.vcxproj -p:Configuration=Debug -p:Platform=Win32 -m
35+
36+
- name: Build x64 version debug (steam_api64.dll)
37+
run: msbuild uc_online2.vcxproj -p:Configuration=Debug -p:Platform=x64 -m
38+
39+
- name: Verify build outputs
40+
shell: pwsh
41+
run: |
42+
$files = @(
43+
"relbuild/x86/steam_api.dll",
44+
"relbuild/x64/steam_api64.dll"
45+
"debbuild/x86/steam_api.dll"
46+
"debbuild/x64/steam_api64.dll"
47+
)
48+
49+
foreach ($file in $files) {
50+
if (-not (Test-Path $file)) {
51+
throw "Missing expected build output: $file"
52+
}
53+
}
54+
55+
- name: Package release zip
56+
shell: pwsh
57+
run: |
58+
$packageRootrel = "dist/uc-online2-${{ github.ref_name }}-release"
59+
$archivePathrel = "$packageRootrel.zip"
60+
61+
New-Item -ItemType Directory -Path "$packageRootrel/x86" -Force | Out-Null
62+
New-Item -ItemType Directory -Path "$packageRootrel/x64" -Force | Out-Null
63+
64+
Copy-Item "relbuild/x86/steam_api.dll" "$packageRootrel/x86/steam_api.dll"
65+
Copy-Item "relbuild/x64/steam_api64.dll" "$packageRootrel/x64/steam_api64.dll"
66+
67+
if (Test-Path $archivePathrel) {
68+
Remove-Item $archivePathrel -Force
69+
}
70+
71+
Compress-Archive -Path $packageRootrel -DestinationPath $archivePathrel
72+
73+
- name: Package debug zip
74+
shell: pwsh
75+
run: |
76+
$packageRootdeb = "dist/uc-online2-${{ github.ref_name }}-debug"
77+
$archivePathdeb = "$packageRootdeb.zip"
78+
79+
New-Item -ItemType Directory -Path "$packageRootdeb/x86" -Force | Out-Null
80+
New-Item -ItemType Directory -Path "$packageRootdeb/x64" -Force | Out-Null
81+
82+
Copy-Item "debbuild/x86/steam_api.dll" "$packageRootdeb/x86/steam_api.dll"
83+
Copy-Item "debbuild/x64/steam_api64.dll" "$packageRootdeb/x64/steam_api64.dll"
84+
85+
if (Test-Path $archivePathdeb) {
86+
Remove-Item $archivePathdeb -Force
87+
}
88+
89+
Compress-Archive -Path $packageRootdeb -DestinationPath $archivePathdeb
90+
91+
- name: Upload workflow artifact
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: |
95+
uc-online2-${{ github.ref_name }}-release
96+
uc-online2-${{ github.ref_name }}-debug
97+
path: |
98+
dist/uc-online2-${{ github.ref_name }}-release.zip
99+
dist/uc-online2-${{ github.ref_name }}-debug.zip
100+
if-no-files-found: error
101+
102+
- name: Publish release assets
103+
if: startsWith(github.ref, 'refs/tags/')
104+
uses: softprops/action-gh-release@v2
105+
with:
106+
tag_name: ${{ github.ref_name }}
107+
name: ${{ github.ref_name }}
108+
files: |
109+
dist/uc-online2-${{ github.ref_name }}-release.zip
110+
dist/uc-online2-${{ github.ref_name }}-debug.zip
111+
generate_release_notes: true
112+
fail_on_unmatched_files: true

0 commit comments

Comments
 (0)