Skip to content

Commit fe652b4

Browse files
committed
Upload mscvcbuild.yml
1 parent 4fff345 commit fe652b4

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/msvcbuild.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build & Release
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
paths:
7+
- "**.cpp"
8+
- "**.h"
9+
workflow_dispatch:
10+
11+
env:
12+
PROJECT_NAME: ReenableAssetUncooking
13+
SOLUTION_FILE_PATH: .\ReenableAssetUncooking\ReenableAssetUncooking.sln
14+
BUILD_CONFIGURATION: Release
15+
PLATFORM: x64
16+
17+
jobs:
18+
build:
19+
runs-on: windows-2022
20+
21+
permissions:
22+
contents: write
23+
24+
steps:
25+
- name: Checkout Code
26+
uses: actions/checkout@v3
27+
28+
- name: Setup MSBuild
29+
uses: microsoft/setup-msbuild@v1.0.2
30+
31+
- name: Get Version
32+
id: version
33+
run: |
34+
$name = "${{env.PROJECT_NAME}}"
35+
$VERSION=Select-String -Path .\$name\dllmain.cpp -Pattern "constexpr .* ASI_VERSION ?="
36+
$VERSION=[regex]::Match($VERSION, '\d+(\.\d+){1,}').Value
37+
echo "current_version=$VERSION" >> $env:GITHUB_OUTPUT
38+
39+
- name: Build ReenableAssetUncooking
40+
working-directory: ${{env.GITHUB_WORKSPACE}}
41+
run: msbuild /m .\${{env.PROJECT_NAME}}\${{env.PROJECT_NAME}}.sln /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.PLATFORM}}
42+
43+
- name: GH Release
44+
uses: softprops/action-gh-release@v0.1.15
45+
with:
46+
files: ${{env.PROJECT_NAME}}/${{env.PLATFORM}}/${{env.BUILD_CONFIGURATION}}/${{env.PROJECT_NAME}}.dll
47+
name: ${{env.PROJECT_NAME}} v${{env.PROJECT_VERSION}}
48+
tag_name: v${{env.PROJECT_VERSION}}
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
PROJECT_VERSION: ${{ steps.version.outputs.current_version }}

0 commit comments

Comments
 (0)