Files
open-xiaoai/.github/workflows/LX06.yaml
T
2025-04-13 12:28:48 +08:00

43 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: 小爱音箱 ProLX06
on:
workflow_dispatch:
inputs:
ota:
description: " 请输入 OTA 版本信息"
type: string
required: true
jobs:
build:
name: 小爱音箱 Pro 固件更新
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 🔥 构建固件
id: build
run: |
cd packages/client-patch
docker run --rm -e OTA=${{ inputs.ota }} -v $(pwd)/assets:/app/assets -v $(pwd)/patches:/app/patches idootop/open-xiaoai:latest
MODEL=$(cat assets/.model)
VERSION=$(cat assets/.version)
TAG=${MODEL}_${VERSION}
FIRMWARE=$(basename $(ls \assets/*.bin 2>/dev/null | head -n 1) .bin)
cp assets/$FIRMWARE/root.squashfs assets/${TAG}.squashfs
cp assets/$FIRMWARE/root-patched.squashfs assets/${TAG}_patched.squashfs
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=$TAG" >> $GITHUB_OUTPUT
- name: ✅ 发布固件
uses: ncipollo/release-action@v1
with:
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
name: 小爱音箱 Pro v${{ steps.build.outputs.version }}
tag: ${{ steps.build.outputs.tag }}
body: 小爱音箱 Pro v${{ steps.build.outputs.version }} 固件更新
draft: false
prerelease: false
makeLatest: latest
removeArtifacts: true
artifacts: packages/client-patch/assets/*.squashfs