Skip to content

Commit e7cf32d

Browse files
committed
Solution building becomes composite action
Moving environment prep & solution building into its own composite action, which makes much more sense then trying to split workflow up between jobs.
1 parent c75eef3 commit e7cf32d

File tree

3 files changed

+50
-75
lines changed

3 files changed

+50
-75
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "Build Solution"
2+
description: "Execute MSBuild with desired settings."
3+
inputs:
4+
build-mode:
5+
description: 'Solution build mode passed to MSBuild.'
6+
required: true
7+
8+
version:
9+
description: 'Version number to refer to this build and its assets, in the form `major.minor.build`.'
10+
required: true
11+
12+
compile-langs:
13+
description: 'Install the Multilingual App Toolkit extension, so that languages are compiled.'
14+
required: true
15+
16+
runs:
17+
using: "composite"
18+
steps:
19+
- name: Setup MSBuild
20+
uses: microsoft/setup-msbuild@v1
21+
- name: Restore Packages
22+
working-directory: WinNUT_V2
23+
shell: pwsh
24+
run: msbuild $env:SLN_DIR -t:restore
25+
- name: Install Multilingual App Toolkit extension
26+
if: inputs.compile-langs == 'true'
27+
uses: microcompiler/install-vsix@db1f973c3d24d1ddc0c38f14d0e1e3a85b2ccb21
28+
with:
29+
packagename: 'dts-publisher.mat2022'
30+
- name: Build solution
31+
shell: pwsh
32+
working-directory: WinNUT_V2
33+
run: >
34+
msbuild WinNUT_V2.sln -nologo
35+
-property:Configuration=${{ inputs.build-mode }}
36+
-property:Version=${{ inputs.version }}

.github/workflows/build-debug.yaml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Build the solution to verify a successful build in debug mode.
2-
31
name: build-debug
42

53
on:
@@ -15,26 +13,24 @@ env:
1513
SHORT_SHA:
1614

1715
jobs:
18-
prepare-environment:
16+
build-debug:
1917
runs-on: windows-latest
2018
steps:
21-
- name: Get short SHA
19+
- name: "Get Short SHA"
20+
id: "get-short-sha"
21+
shell: pwsh
2222
run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 8))" >> $env:GITHUB_ENV
23-
24-
build-solution:
25-
uses: ./.github/workflows/build-solution.yaml
26-
with:
27-
buildMode: 'Debug'
28-
version: '2.2.*'
29-
compileLangs: false
30-
31-
build-debug:
32-
needs: build-solution
33-
# runs-on: windows-latest
34-
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v3
25+
- name: Build solution in Debug configuration (no multilingual)
26+
uses: ./.github/actions/build-solution
27+
with:
28+
build-mode: "Debug"
29+
version: "2.2.*"
30+
compile-langs: false
3531
- name: Package output
3632
uses: actions/upload-artifact@v3
3733
with:
38-
name: ${{ format('winnut-{0}-{1}', inputs.buildMode, env.SHORT_SHA) }}
34+
name: ${{ format('winnut-client-debug-{0}', env.SHORT_SHA) }}
3935
if-no-files-found: error
40-
path: WinNUT_V2/WinNUT_GUI/bin/Debug
36+
path: WinNUT_V2/WinNUT-Client/bin/Debug

.github/workflows/build-solution.yaml

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)