Skip to content

Commit 4a6dd8f

Browse files
committed
Add PR builds as well
1 parent efbe616 commit 4a6dd8f

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

‎.github/workflows/testBuilds.yml‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: MSBuild
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
env:
8+
SOLUTION_FILE_PATH: SHOWOFF-NVSE/ShowOffNVSE.sln
9+
10+
permissions: write-all
11+
12+
jobs:
13+
build:
14+
runs-on: windows-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Add MSBuild to PATH
20+
uses: microsoft/setup-msbuild@v2
21+
22+
- name: Build Release
23+
working-directory: ${{env.GITHUB_WORKSPACE}}
24+
run: msbuild /m /p:Configuration=Release ${{env.SOLUTION_FILE_PATH}} /p:PostBuildEventUseInBuild=false
25+
26+
- name: Build Debug
27+
working-directory: ${{env.GITHUB_WORKSPACE}}
28+
run: msbuild /m /p:Configuration=Debug ${{env.SOLUTION_FILE_PATH}} /p:PostBuildEventUseInBuild=false
29+
30+
- name: Generate Timestamp
31+
run: |
32+
timestamp=$(date +"%Y%m%d%H%M%S")
33+
echo "artifact_timestamp=$timestamp" >> $GITHUB_ENV
34+
shell: bash
35+
36+
- name: Package Artifacts
37+
run: |
38+
mkdir -p artifacts
39+
Compress-Archive -Path SHOWOFF-NVSE\Release\ShowOffNVSE.dll, SHOWOFF-NVSE\Release\ShowOffNVSE.pdb -DestinationPath artifacts\ShowOffNVSE-Release-${{ env.artifact_timestamp }}.zip
40+
Compress-Archive -Path SHOWOFF-NVSE\Debug\ShowOffNVSE.dll, SHOWOFF-NVSE\Debug\ShowOffNVSE.pdb -DestinationPath artifacts\ShowOffNVSE-Debug-${{ env.artifact_timestamp }}.zip
41+
shell: pwsh
42+
43+
- name: Publish Zipped Artifacts
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: Zipped-Artifacts-${{ env.artifact_timestamp }}
47+
path: artifacts/

0 commit comments

Comments
 (0)