@@ -38,12 +38,30 @@ jobs:
3838 id : labeler
3939 uses : actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
4040
41+ build :
42+ name : Build
43+ runs-on : ubuntu-latest
44+ permissions :
45+ contents : write
46+ outputs :
47+ release-version : ${{ steps.build.outputs.release-version }}
48+ steps :
49+ - name : Checkout repository
50+ uses : actions/checkout@v4
51+ with :
52+ fetch-depth : 0
53+ token : ${{ secrets.GITHUB_TOKEN }}
54+
55+ - name : Build Module
56+ id : build
57+ uses : ./.github/actions/ps-build
58+ with :
59+ release-type : Debug
60+
4161 unit-tests :
4262 name : Unit Tests
43- runs-on : ${{ matrix.os }}
44- strategy :
45- matrix :
46- os : [ubuntu-latest, windows-latest, macos-latest]
63+ needs : [build]
64+ runs-on : ubuntu-latest
4765 permissions :
4866 contents : read
4967 issues : write
@@ -87,54 +105,6 @@ jobs:
87105 files : test-results/**/*.trx
88106 check_name : Unit Test Results
89107
90- build :
91- name : Build
92- needs : [unit-tests]
93- runs-on : ubuntu-latest
94- permissions :
95- contents : write
96- outputs :
97- release-version : ${{ steps.gitversion.outputs.majorMinorPatch }}
98- steps :
99- - name : Checkout repository
100- uses : actions/checkout@v6
101- with :
102- fetch-depth : 0
103- token : ${{ secrets.GITHUB_TOKEN }}
104-
105- - name : Install GitVersion tool
106- uses : gittools/actions/gitversion/setup@2685caa112fc953a61603836655d04cbc57bc2aa
107- with :
108- versionSpec : ' 6.5.1'
109-
110- - name : Get semantic build version
111- id : gitversion
112- uses : gittools/actions/gitversion/execute@2685caa112fc953a61603836655d04cbc57bc2aa
113- with :
114- configFilePath : GitVersion.yml
115- disableShallowCloneCheck : true
116-
117- - name : Setup .NET
118- uses : actions/setup-dotnet@v5
119- with :
120- dotnet-version : ' 8.0.x'
121-
122- - name : Setup PowerShell
123- shell : pwsh
124- run : |
125- Install-PSResource -Name InvokeBuild -TrustRepository -AcceptLicense
126-
127- - name : Build Module
128- shell : pwsh
129- run : |
130- Invoke-Build -Task Build -SemanticVersion ${{ steps.gitversion.outputs.majorMinorPatch }}
131-
132- - name : Upload build artifact
133- uses : actions/upload-artifact@v6
134- with :
135- name : PSBinaryModule
136- path : build/out/PSBinaryModule/
137-
138108 integration-tests :
139109 name : Integration Tests
140110 needs : [build]
@@ -156,8 +126,8 @@ jobs:
156126 with :
157127 dotnet-version : ' 8.0.x'
158128
159- - name : Download build artifact
160- uses : actions/download-artifact@v7
129+ - name : Download all build artifacts
130+ uses : actions/download-artifact@v5
161131 with :
162132 name : PSBinaryModule
163133 path : build/out/PSBinaryModule
0 commit comments