88 workflow_dispatch :
99
1010jobs :
11+ prepare :
12+ runs-on : ubuntu-latest
13+ outputs :
14+ RELEASE_TAG : ${{ steps.release_tag.outputs.RELEASE_TAG }}
15+ steps :
16+ - name : Name release tag after today's date
17+ id : release_tag
18+ run : echo "RELEASE_TAG=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
19+
20+ - name : Create draft release
21+ uses : softprops/action-gh-release@v2
22+ with :
23+ tag_name : ${{ steps.release_tag.outputs.RELEASE_TAG }}
24+ draft : true
25+ prerelease : true
26+
1127 build :
28+ needs : prepare
1229 strategy :
1330 fail-fast : false
1431 matrix :
1532 include :
1633 - platform : mac-intel
17- os : macos-14
34+ os : macos-15
1835 before_install : macos.sh
1936 conan_profile : macos-intel
2037 conan_system_libs : bzip2 libiconv sqlite3 zlib
2138 - platform : mac-arm
22- os : macos-14
39+ os : macos-15
2340 before_install : macos.sh
2441 conan_profile : macos-arm
2542 conan_system_libs : bzip2 libiconv sqlite3 zlib
2643 - platform : ios
27- os : macos-14
44+ os : macos-15
2845 before_install : macos.sh
2946 conan_profile : ios-arm64
3047 conan_system_libs : bzip2 libiconv sqlite3 zlib
4663 defaults :
4764 run :
4865 shell : bash
49-
5066 steps :
5167 - name : Checkout VCMI
5268 uses : actions/checkout@v4
@@ -113,9 +129,7 @@ jobs:
113129 recipePathMd4c='recipes/md4c'
114130 recipePathMinizip='recipes/minizip'
115131 recipePathQt='recipes/qt'
116-
117- cwdNative=$(python3 -c 'import os; print(os.getcwd())')
118- custom_patches_path="$cwdNative/deps/conan_patches"
132+ custom_patches_path="$(pwd)/deps/conan_patches"
119133
120134 #extraAndroidOptions="-o qt/*:android_sdk=$ANDROID_HOME"
121135 #extraOptionsBash=${{ startsWith(matrix.platform, 'android') && '"-o qt/*:android_sdk=$ANDROID_HOME"' || '' }}
@@ -161,7 +175,6 @@ jobs:
161175 # Windows workaround for https://bugreports.qt.io/browse/QTBUG-84543
162176 PATH="/c/Strawberry/perl/bin:$PATH" $conanCreateCommand ${{ startsWith(matrix.platform, 'android') && '-o "qt/*:android_sdk=$ANDROID_HOME"' || '' }}
163177 done
164- exit 1
165178
166179 # TODO: remove when https://github.com/conan-io/conan-center-index/pull/26577 is merged
167180 - name : Build LuaJIT from PR changes
@@ -201,8 +214,8 @@ jobs:
201214 - name : Get NDK path
202215 if : ${{ startsWith(matrix.platform, 'android') }}
203216 run : |
204- ndkPackage=" android-ndk"
205- hexRegex=" [[:xdigit:]]+"
217+ ndkPackage=' android-ndk'
218+ hexRegex=' [[:xdigit:]]+'
206219
207220 ndkPackageRevision=$(conan list --format=compact "$ndkPackage/*:*" \
208221 | egrep --only-matching "$ndkPackage/\\w+#$hexRegex:$hexRegex")
@@ -211,25 +224,58 @@ jobs:
211224
212225 - name : Remove build requirements' binaries
213226 run : |
214- buildPackages=$(conan graph info . \
227+ graphFile='graph.json'
228+ packageListFile='pkglist.json'
229+
230+ conan graph info . \
215231 --profile=CI/conan/${{ matrix.conan_profile }} \
216232 --format=json \
217233 --build=never \
218234 --no-remote \
219235 --filter=context \
220- | jq -rb '.graph.nodes[] | select(.context == "build") | .ref' \
221- | sort | uniq \
222- )
223- for p in $buildPackages ; do
224- conan remove --confirm "$p:*"
225- done
236+ > "$graphFile"
237+ conan list \
238+ --graph "$graphFile" \
239+ --graph-context=build-only \
240+ --format=json \
241+ > "$packageListFile"
242+ conan remove --list "$packageListFile" --confirm
243+
244+ - name : Create list of built packages
245+ run : |
246+ packageList="$(conan list --format=compact | tail -n +2)"
247+ echo "CONAN_PACKAGES<<EOF\n$packageList\nEOF" >> $GITHUB_ENV
226248
227249 - name : Create dependencies archive
228250 run : conan cache save --file dependencies-${{matrix.platform}}.tgz "*:*"
229251
230- - name : Upload artifacts
252+ - name : Upload artifact
231253 uses : actions/upload-artifact@v4
232254 with :
233255 name : dependencies-${{ matrix.platform }}
234256 compression-level : 0
235257 path : ' dependencies-${{matrix.platform}}.tgz'
258+
259+ - name : Update release with artifact and text
260+ uses : softprops/action-gh-release@v2
261+ with :
262+ tag_name : ${{ needs.prepare.outputs.RELEASE_TAG }}
263+ files : ' dependencies-${{matrix.platform}}.tgz'
264+ append_body : true
265+ body : |
266+ <details><summary>${{ matrix.platform }} packages</summary>
267+
268+ ```
269+ ${{ env.CONAN_PACKAGES }}
270+ ```
271+ </details>
272+
273+ release :
274+ needs : [prepare, build]
275+ runs-on : ubuntu-latest
276+ steps :
277+ - name : Publish release
278+ uses : softprops/action-gh-release@v2
279+ with :
280+ tag_name : ${{ needs.prepare.outputs.RELEASE_TAG }}
281+ draft : false
0 commit comments