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:
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@@ -4,10 +4,11 @@ name: PlatformIO CI
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Build VERSION in format yymmddb (optional, for nightly builds)'
|
||||
nightly_build:
|
||||
description: 'Flag to indicate this is a nightly build'
|
||||
required: false
|
||||
type: string
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -67,7 +68,7 @@ jobs:
|
||||
- name: Build firmware
|
||||
env:
|
||||
WLED_RELEASE: True
|
||||
PLATFORMIO_BUILD_FLAGS: ${{ inputs.version && format('-D VERSION={0}', inputs.version) || '' }}
|
||||
WLED_NIGHTLY_BUILD: ${{ inputs.nightly_build && 'true' || 'false' }}
|
||||
run: pio run -e ${{ matrix.environment }}
|
||||
- name: Rename Bin
|
||||
run: mv -v .pio/build/${{ matrix.environment }}/firmware.bin firmware-${{ matrix.environment }}.bin
|
||||
|
||||
Reference in New Issue
Block a user