Implement nightly VERSION automation using PlatformIO script

- Created pio-scripts/set_nightly_version.py following existing set_version.py pattern
- Script sets VERSION to yymmddb format with build number 0 for nightly builds
- Modified build.yml to accept nightly_build boolean input
- Modified nightly.yml to pass nightly_build=true flag
- Added set_nightly_version.py to platformio.ini extra_scripts
- Uses WLED_NIGHTLY_BUILD environment variable to conditionally set VERSION

Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-15 10:11:48 +00:00
parent 8c70acad65
commit 39899c1061
4 changed files with 18 additions and 20 deletions

View File

@@ -8,25 +8,10 @@ on:
workflow_dispatch:
jobs:
calculate_version:
name: Calculate VERSION
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Calculate VERSION
id: version
run: |
# VERSION format: yymmddb (b = daily build number, set to 1 for nightly)
VERSION=$(date -u +"%y%m%d")1
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Calculated VERSION: $VERSION"
wled_build:
needs: calculate_version
uses: ./.github/workflows/build.yml
with:
version: ${{ needs.calculate_version.outputs.version }}
nightly_build: true
nightly:
name: Deploy nightly
runs-on: ubuntu-latest