Skip to content

添加电子书阅读器功能 #73

添加电子书阅读器功能

添加电子书阅读器功能 #73

Workflow file for this run

name: Build EPD Reader
on:
push:
branches: [ main ]
tags:
- 'v*'
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- sf32-oed-epd_v11
fail-fast: false
name: Build ${{ matrix.target }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup SiFli SDK environment
run: |
cd SiFli-SDK
./install.sh
- name: Build ${{ matrix.target }}
run: |
cd SiFli-SDK
source ./export.sh
cd ../epdiy-epub/project
scons --board=${{ matrix.target }} --board_search_path=.. -j$(nproc)
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.target }}
path: |
epdiy-epub/project/build_*
retention-days: 7
- name: Prepare release files
if: startsWith(github.ref, 'refs/tags/')
run: |
BUILD_DIR="epdiy-epub/project/build_${{ matrix.target }}_hcpu"
# Create release directory first
mkdir -p "release/${{ matrix.target }}"
# Copy all .bin, .json, .ini files while preserving directory structure
cd "$BUILD_DIR"
find . -type f \( -name "*.bin" -o -name "*.json" -o -name "*.ini" \) -exec cp --parents {} "../../../release/${{ matrix.target }}/" \;
cd ../../..
# List files for debugging
echo "Release files for ${{ matrix.target }}:"
find release/${{ matrix.target }}/ -type f | sort
# Create a zip archive for this target
cd release
zip -r ${{ matrix.target }}.zip ${{ matrix.target }}/
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
artifacts: "release/${{ matrix.target }}.zip"
generateReleaseNotes: true
allowUpdates: true
artifactErrorsFailBuild: false
name: "EPD Reader Release ${{ github.ref_name }}"
tag: ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
body: |
## EPD Reader Firmware Release ${{ github.ref_name }}
### Build Information
- Target Board: ${{ matrix.target }}
- Build Date: ${{ github.event.head_commit.timestamp }}
- Commit: ${{ github.sha }}
### Files Included
- `bootloader.bin` - Bootloader binary
- `ftab.bin` - Flash table binary
- `*.bin` - Main application binaries
- `fs_root.bin` - File system image (if available)
### Installation
1. Extract the zip file for your target board
2. Flash the binaries to your EPD reader device