Add automatic VERSION setting for nightly builds
- Modified build.yml to accept optional version input parameter - Modified nightly.yml to calculate VERSION from build date in format yymmddb - VERSION is passed as PLATFORMIO_BUILD_FLAGS to override default in wled.h - Other workflows (wled-ci.yml, release.yml) unchanged and will use default VERSION Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com>
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -3,6 +3,11 @@ name: PlatformIO CI
|
||||
# Only included into other workflows
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Build VERSION in format yymmddb (optional, for nightly builds)'
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -62,6 +67,7 @@ jobs:
|
||||
- name: Build firmware
|
||||
env:
|
||||
WLED_RELEASE: True
|
||||
PLATFORMIO_BUILD_FLAGS: ${{ inputs.version && format('-D VERSION={0}', inputs.version) || '' }}
|
||||
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