99env :
1010 BUILD_DIR : src\Build\Bin
1111 MSBUILD_TOOLSET : v143
12+ ARTIFACT_PREFIX : NppJSONViewer_
1213
1314jobs :
1415 build :
@@ -33,27 +34,27 @@ jobs:
3334 # Step 3: Build projects and unit test
3435 - name : Build code
3536 working-directory : src
36- run : msbuild NppJSONViewer.sln /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}" /p:PlatformToolset=${{ env.MSBUILD_TOOLSET }}
37+ run : msbuild NppJSONViewer.sln /m /p:configuration="${{matrix.build_configuration}}" /p:platform="${{matrix.build_platform}}" /p:PlatformToolset=${{env.MSBUILD_TOOLSET}}
3738
3839 # Step 4: Upload build binary artifacts for deployment
3940 - name : Archive binaries artifacts
4041 uses : actions/upload-artifact@v4
4142 with :
42- name : NppJSONViewer_ ${{ matrix.build_platform}}_${{ matrix.build_configuration}}
43- path : ${{ env.BUILD_DIR }}\${{ matrix.build_configuration}}\${{ matrix.build_platform}}\NPPJSONViewer.dll
43+ name : ${{env.ARTIFACT_PREFIX}}${{ matrix.build_platform}}_${{matrix.build_configuration}}
44+ path : ${{env.BUILD_DIR }}\${{matrix.build_configuration}}\${{matrix.build_platform}}\NPPJSONViewer.dll
4445
4546 # Step 5: Upload build pdb artifacts
4647 - name : Archive symbols artifacts
4748 uses : actions/upload-artifact@v4
4849 with :
49- name : NppJSONViewer_ ${{ matrix.build_platform}}_${{ matrix.build_configuration}}_pdb
50- path : ${{ env.BUILD_DIR }}\${{ matrix.build_configuration}}\${{ matrix.build_platform}}\NPPJSONViewer.pdb
50+ name : ${{env.ARTIFACT_PREFIX}}${{ matrix.build_platform}}_${{matrix.build_configuration}}_pdb
51+ path : ${{env.BUILD_DIR }}\${{matrix.build_configuration}}\${{matrix.build_platform}}\NPPJSONViewer.pdb
5152
5253 # Step 6: Run unit tests for x86 and x64
5354 - name : Run unit tests
5455 if : matrix.build_platform == 'Win32' || matrix.build_platform == 'x64'
5556 run : |
56- cd ${{ env.BUILD_DIR }}\${{ matrix.build_configuration }}\${{ matrix.build_platform }}
57+ cd ${{env.BUILD_DIR}}\${{matrix.build_configuration}}\${{matrix.build_platform}}
5758 ./UnitTest.exe
5859
5960 upload-full-artifacts :
@@ -64,52 +65,16 @@ jobs:
6465 fail-fast : true
6566
6667 steps :
67- # Step 8 : Download all artifacts from all build jobs
68- - name : Download Release Win32 binaries and PDBs
68+ # Step 7 : Download all artifacts from the build job
69+ - name : Download all artifacts
6970 uses : actions/download-artifact@v4
7071 with :
71- path : all_artifacts/Release/win32
72- pattern : NppJSONViewer_Win32_Rel*
73- merge-multiple : true
72+ pattern : ${{env.ARTIFACT_PREFIX}}*
73+ path : all_artifacts\
7474
75- - name : Download Debug Win32 binaries and PDBs
76- uses : actions/download-artifact@v4
77- with :
78- path : all_artifacts/Debug/win32
79- pattern : NppJSONViewer_Win32_Deb*
80- merge-multiple : true
81-
82- - name : Download Release x64 binaries and PDBs
83- uses : actions/download-artifact@v4
84- with :
85- path : all_artifacts/Release/x64
86- pattern : NppJSONViewer_x64_Rel*
87- merge-multiple : true
88-
89- - name : Download Debug x64 binaries and PDBs
90- uses : actions/download-artifact@v4
91- with :
92- path : all_artifacts/Debug/x64
93- pattern : NppJSONViewer_x64_Deb*
94- merge-multiple : true
95-
96- - name : Download Release ARM64 binaries and PDBs
97- uses : actions/download-artifact@v4
98- with :
99- path : all_artifacts/Release/ARM64
100- pattern : NppJSONViewer_ARM64_Rel*
101- merge-multiple : true
102-
103- - name : Download Debug ARM64 binaries and PDBs
104- uses : actions/download-artifact@v4
105- with :
106- path : all_artifacts/Debug/ARM64
107- pattern : NppJSONViewer_ARM64_Deb*
108- merge-multiple : true
109-
110- # Step 9: Upload full artifact
111- - name : Upload full artifacts
75+ # Step 8: Upload consolidated artifacts as a single artifact
76+ - name : Upload full artifact
11277 uses : actions/upload-artifact@v4
11378 with :
114- name : NppJSONViewer_ALL
79+ name : ${{env.ARTIFACT_PREFIX}}ALL
11580 path : all_artifacts\**
0 commit comments