Skip to content

Commit 57c01c9

Browse files
committed
Relocate artifact upload step out of workflows
Artifact uploading occurs in the build solution action now, directly after compilation happens. This should simplify calling workflows. Testing the change in debug only for now.
1 parent 013e46f commit 57c01c9

File tree

2 files changed

+14
-28
lines changed

2 files changed

+14
-28
lines changed
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "Build Solution"
2-
description: "Execute MSBuild with desired settings."
2+
description: "Execute MSBuild with desired settings, and upload resulting artifact."
33
inputs:
44
build-mode:
55
description: 'Solution build mode passed to MSBuild.'
@@ -9,28 +9,28 @@ inputs:
99
description: 'Version number to refer to this build and its assets, in the form `major.minor.build`.'
1010
required: true
1111

12-
compile-langs:
13-
description: 'Install the Multilingual App Toolkit extension, so that languages are compiled.'
14-
required: true
15-
1612
runs:
1713
using: "composite"
1814
steps:
15+
- name: "Get Short SHA"
16+
shell: pwsh
17+
run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 8))" >> $env:GITHUB_ENV
1918
- name: Setup MSBuild
2019
uses: microsoft/setup-msbuild@v1
2120
- name: Restore Packages
2221
working-directory: WinNUT_V2
2322
shell: pwsh
2423
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'
3024
- name: Build solution
3125
shell: pwsh
3226
working-directory: WinNUT_V2
3327
run: >
3428
msbuild WinNUT_V2.sln -nologo
3529
-property:Configuration=${{ inputs.build-mode }}
36-
-property:Version=${{ inputs.version }}
30+
-property:Version=${{ inputs.version }}
31+
- name: Package output
32+
uses: actions/upload-artifact@v3
33+
with:
34+
name: ${{ format('winnut-client-{0}-{1}', inputs.build-mode, env.SHORT_SHA) }}
35+
if-no-files-found: error
36+
path: WinNUT_V2/WinNUT-Client/bin/${{ inputs.build-mode }}

.github/workflows/build-debug.yaml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,19 @@ on:
44
workflow_dispatch:
55

66
pull_request:
7-
branches: [ Dev-2.2 ] # Debug builds for PRs that target the dev branch.
7+
branches: Dev-2.2
88
paths:
99
- '**.vb'
1010
- '**.vbproj'
1111

12-
env:
13-
SHORT_SHA:
14-
1512
jobs:
1613
build-debug:
1714
runs-on: windows-latest
1815
steps:
19-
- name: "Get Short SHA"
20-
id: "get-short-sha"
21-
shell: pwsh
22-
run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 8))" >> $env:GITHUB_ENV
2316
- name: Checkout code
2417
uses: actions/checkout@v3
25-
- name: Build solution in Debug configuration (no multilingual)
18+
- name: Build solution in Debug configuration
2619
uses: ./.github/actions/build-solution
2720
with:
2821
build-mode: "Debug"
29-
version: "2.2.*"
30-
compile-langs: false
31-
- name: Package output
32-
uses: actions/upload-artifact@v3
33-
with:
34-
name: ${{ format('winnut-client-debug-{0}', env.SHORT_SHA) }}
35-
if-no-files-found: error
36-
path: WinNUT_V2/WinNUT-Client/bin/Debug
22+
version: "${{ vars.PRERELEASE_VERSION }}.*"

0 commit comments

Comments
 (0)