From ced0bd2a522d81ae4d37b773db8da7a5943eb370 Mon Sep 17 00:00:00 2001 From: Liu Date: Sun, 22 Nov 2026 22:14:30 +0800 Subject: [PATCH] ci: attach example archives to release assets --- .github/workflows/ccpp.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 899e3eb7..a193682d 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -177,6 +177,15 @@ jobs: - name: Install examples run: xmake install -o dist/lcui-examples -g lcui-examples + - name: Build examples archive + if: startsWith(github.ref, 'refs/tags/v') + shell: pwsh + run: | + $plat = if ($env:RUNNER_OS -eq 'Windows') { 'windows' } else { 'linux' } + $version = $env:GITHUB_REF -replace '^refs/tags/v', '' + Compress-Archive -Path dist/lcui-examples/* -DestinationPath "dist/lcui-$version-$plat-x64-examples.zip" + Get-Item "dist/lcui-$version-$plat-x64-examples.zip" | Select-Object Name, Length + - uses: actions/upload-artifact@v7 with: name: lcui${{ env.TARGET_MAJOR }}-${{ env.TARGET_VERSION }}-${{ env.TARGET_KIND }} (${{ runner.os }})