mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-20 12:32:18 +08:00
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:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user