8282 - name : Build (static, Release)
8383 run : cmake --build build/${{ matrix.preset }}-static --config Release
8484
85+ - name : Package (static)
86+ working-directory : build/${{ matrix.preset }}-static
87+ run : cpack -C Release
88+
89+ - name : Upload package (static)
90+ uses : actions/upload-artifact@v6
91+ with :
92+ name : package-${{ matrix.compiler }}-static
93+ path : |
94+ build/${{ matrix.preset }}-static/Eggs.Assert-*.tar.gz
95+ build/${{ matrix.preset }}-static/Eggs.Assert-*.zip
96+ if-no-files-found : error
97+ retention-days : 7
98+
8599 # -----------------------------------------------------------------------
86100 # Shared library build
87101 # -----------------------------------------------------------------------
@@ -102,6 +116,20 @@ jobs:
102116 - name : Build (shared, Release)
103117 run : cmake --build build/${{ matrix.preset }}-shared --config Release
104118
119+ - name : Package (shared)
120+ working-directory : build/${{ matrix.preset }}-shared
121+ run : cpack -C Release
122+
123+ - name : Upload package (shared)
124+ uses : actions/upload-artifact@v6
125+ with :
126+ name : package-${{ matrix.compiler }}-shared
127+ path : |
128+ build/${{ matrix.preset }}-shared/Eggs.Assert-*.tar.gz
129+ build/${{ matrix.preset }}-shared/Eggs.Assert-*.zip
130+ if-no-files-found : error
131+ retention-days : 7
132+
105133 # -----------------------------------------------------------------------
106134 # FetchContent variant — simulates embedding via FetchContent_MakeAvailable
107135 # -----------------------------------------------------------------------
@@ -145,53 +173,21 @@ jobs:
145173 --prefix ${{ runner.temp }}/eggs-assert-install-static-debug
146174 --config Debug
147175
148- - name : Upload installed package (static, Debug)
149- uses : actions/upload-artifact@v6
150- with :
151- name : installed-package-${{ matrix.compiler }}-static-debug
152- path : ${{ runner.temp }}/eggs-assert-install-static-debug
153- if-no-files-found : error
154- retention-days : 7
155-
156176 - name : Test Install (static, Release)
157177 run : cmake --install build/${{ matrix.preset }}-static
158178 --prefix ${{ runner.temp }}/eggs-assert-install-static-release
159179 --config Release
160180
161- - name : Upload installed package (static, Release)
162- uses : actions/upload-artifact@v6
163- with :
164- name : installed-package-${{ matrix.compiler }}-static-release
165- path : ${{ runner.temp }}/eggs-assert-install-static-release
166- if-no-files-found : error
167- retention-days : 7
168-
169181 - name : Test Install (shared, Debug)
170182 run : cmake --install build/${{ matrix.preset }}-shared
171183 --prefix ${{ runner.temp }}/eggs-assert-install-shared-debug
172184 --config Debug
173185
174- - name : Upload installed package (shared, Debug)
175- uses : actions/upload-artifact@v6
176- with :
177- name : installed-package-${{ matrix.compiler }}-shared-debug
178- path : ${{ runner.temp }}/eggs-assert-install-shared-debug
179- if-no-files-found : error
180- retention-days : 7
181-
182186 - name : Test Install (shared, Release)
183187 run : cmake --install build/${{ matrix.preset }}-shared
184188 --prefix ${{ runner.temp }}/eggs-assert-install-shared-release
185189 --config Release
186190
187- - name : Upload installed package (shared, Release)
188- uses : actions/upload-artifact@v6
189- with :
190- name : installed-package-${{ matrix.compiler }}-shared-release
191- path : ${{ runner.temp }}/eggs-assert-install-shared-release
192- if-no-files-found : error
193- retention-days : 7
194-
195191 - name : Clean Source and Build Tree
196192 run : cmake -E rm -rf ./include ./src ./build
197193
0 commit comments