ci(release): add steps to prepare and upload lite package (#9443)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
kekxv
2026-01-06 00:13:10 +08:00
committed by GitHub
parent 5ed8fc7894
commit b0a3bf199e
+40
View File
@@ -6,6 +6,10 @@ on:
name: Create Release
# Permissions required to create a release and upload assets
permissions:
contents: write
jobs:
build:
name: Create Release
@@ -25,3 +29,39 @@ jobs:
See the [CHANGELOG](https://github.com/lvgl/lvgl/blob/master/docs/CHANGELOG.rst)
draft: false
prerelease: false
# Remove large folders and create a lite zip
- name: Prepare Lite Package
run: |
echo "Preparing lite package in a temporary directory..."
# Create a temporary directory for the lite package contents
FOLDER_NAME="lvgl-${{ github.ref_name }}-lite"
ZIP_NAME="$FOLDER_NAME.zip"
mkdir -p $FOLDER_NAME
echo "Copying files to lite directory (excluding large/unnecessary folders)..."
rsync -av \
--exclude='.git' \
--exclude='.github' \
--exclude='tests' \
--exclude='demos' \
--exclude='scripts' \
--exclude='docs' \
--exclude='examples' \
./ $FOLDER_NAME
# Create a zip with lvgl-lite directory as its root directory
zip -r "$ZIP_NAME" $FOLDER_NAME
# Export the variable for the next step
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV
# Upload the lite zip to the release
- name: Upload Lite Asset
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ./${{ env.ZIP_NAME }}