From 468301a2e52ea11cb26a7e5eefb071a4f7c8ee4c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 10:02:26 +0000 Subject: [PATCH 1/9] Initial plan From 8c70acad6580330b2dd9a2c4132829f5a8625276 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 10:08:10 +0000 Subject: [PATCH 2/9] 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> --- .github/workflows/build.yml | 6 ++++++ .github/workflows/nightly.yml | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b02fab4..e741dfb1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index d64b7f13..88b70d11 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -8,8 +8,25 @@ 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: name: Deploy nightly runs-on: ubuntu-latest From 39899c1061a471efef5fc61453238c66b71e0bbb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 10:11:48 +0000 Subject: [PATCH 3/9] 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> --- .github/workflows/build.yml | 9 +++++---- .github/workflows/nightly.yml | 17 +---------------- pio-scripts/set_nightly_version.py | 11 +++++++++++ platformio.ini | 1 + 4 files changed, 18 insertions(+), 20 deletions(-) create mode 100644 pio-scripts/set_nightly_version.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e741dfb1..6adce309 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 88b70d11..0a1edd9d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -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 diff --git a/pio-scripts/set_nightly_version.py b/pio-scripts/set_nightly_version.py new file mode 100644 index 00000000..b069e777 --- /dev/null +++ b/pio-scripts/set_nightly_version.py @@ -0,0 +1,11 @@ +Import('env') +import os +from datetime import datetime, timezone + +# Only set VERSION if this is a nightly build (indicated by environment variable) +if os.environ.get('WLED_NIGHTLY_BUILD') == 'true': + # VERSION format: yymmddb (b = build number, 0 for nightly) + version_code = datetime.now(timezone.utc).strftime("%y%m%d") + "0" + env.Append(BUILD_FLAGS=[f"-DVERSION={version_code}"]) + print(f"Nightly build: Setting VERSION to {version_code}") + diff --git a/platformio.ini b/platformio.ini index 2a5a707a..ebc4ec0a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -224,6 +224,7 @@ ldscript_16m14m = eagle.flash.16m14m.ld [scripts_defaults] extra_scripts = pre:pio-scripts/set_version.py + pre:pio-scripts/set_nightly_version.py pre:pio-scripts/build_ui.py pre:pio-scripts/conditional_usb_mode.py pre:pio-scripts/set_repo.py From 5a8d45b6d3aeee2d55bb428294dbd8e2be6d3e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20M=C3=B6hle?= <91616163+softhack007@users.noreply.github.com> Date: Thu, 15 Jan 2026 11:23:57 +0100 Subject: [PATCH 4/9] use WLED_BUILD_VERSION for override by CI actions avoids potential name clashes with used libraries --- wled00/wled.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wled00/wled.h b/wled00/wled.h index ce6aaec4..c0935e88 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -7,8 +7,10 @@ */ // version code in format yymmddb (b = daily build) -#ifndef VERSION // WLEDMM allow override by nightly build script -#define VERSION 2601151 +#ifndef WLED_BUILD_VERSION // WLEDMM allow override by nightly build script + #define VERSION 2601151 +#else + #define VERSION WLED_BUILD_VERSION #endif // WLEDMM - you can check for this define in usermods, to only enabled WLEDMM specific code in the "right" fork. Its not defined in AC WLED. From d03e3a86554f3f6b3611b8c5a4119d794fa23b10 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 10:27:19 +0000 Subject: [PATCH 5/9] Update set_nightly_version.py to use WLED_BUILD_VERSION define Changed from -DVERSION to -DWLED_BUILD_VERSION to match the updated wled.h override mechanism. Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com> --- pio-scripts/set_nightly_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pio-scripts/set_nightly_version.py b/pio-scripts/set_nightly_version.py index b069e777..176cd988 100644 --- a/pio-scripts/set_nightly_version.py +++ b/pio-scripts/set_nightly_version.py @@ -6,6 +6,6 @@ from datetime import datetime, timezone if os.environ.get('WLED_NIGHTLY_BUILD') == 'true': # VERSION format: yymmddb (b = build number, 0 for nightly) version_code = datetime.now(timezone.utc).strftime("%y%m%d") + "0" - env.Append(BUILD_FLAGS=[f"-DVERSION={version_code}"]) + env.Append(BUILD_FLAGS=[f"-DWLED_BUILD_VERSION={version_code}"]) print(f"Nightly build: Setting VERSION to {version_code}") From 5cfca1b3407d0acb2658e233c8067f874a276f16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20M=C3=B6hle?= <91616163+softhack007@users.noreply.github.com> Date: Thu, 15 Jan 2026 11:38:55 +0100 Subject: [PATCH 6/9] fix indentation minor --- wled00/wled.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wled00/wled.h b/wled00/wled.h index c0935e88..e5047aa5 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,9 +8,9 @@ // version code in format yymmddb (b = daily build) #ifndef WLED_BUILD_VERSION // WLEDMM allow override by nightly build script - #define VERSION 2601151 -#else - #define VERSION WLED_BUILD_VERSION + #define VERSION 2601151 +#else + #define VERSION WLED_BUILD_VERSION #endif // WLEDMM - you can check for this define in usermods, to only enabled WLEDMM specific code in the "right" fork. Its not defined in AC WLED. From 143f89243cfe533eb0c4016ac4d17aa1aa646025 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 11:04:58 +0000 Subject: [PATCH 7/9] Fix changelog generator parameter name from exclude-labels to excludeLabels The action janheinrichmerker/action-github-changelog-generator@v2.3 expects camelCase parameter names. Changed 'exclude-labels' to 'excludeLabels' in both nightly.yml and release.yml to fix the nightly release action failure. Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com> --- .github/workflows/nightly.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 0a1edd9d..aa64a42a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -30,7 +30,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} sinceTag: v14.7.1 # Exclude issues that were closed without resolution from changelog - exclude-labels: 'stale,wontfix,duplicate,invalid' + excludeLabels: 'stale,wontfix,duplicate,invalid' - name: Update Nightly Release uses: andelf/nightly-release@main env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a6b92a09..38705d15 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: sinceTag: v14.7.1 maxIssues: 500 # Exclude issues that were closed without resolution from changelog - exclude-labels: 'stale,wontfix,duplicate,invalid' + excludeLabels: 'stale,wontfix,duplicate,invalid' - name: Create draft release uses: softprops/action-gh-release@v1 with: From 7dff6c7b654e7b2a2bb9c72301354333c8cf8927 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 12:43:33 +0000 Subject: [PATCH 8/9] Update changelog generator action from v2.3 to v2.4 to fix set-output deprecation The v2.4 release fixes the deprecated set-output command by using GITHUB_OUTPUT environment file instead. This eliminates the deprecation warning in nightly builds. Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com> --- .github/workflows/nightly.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index aa64a42a..91213955 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -25,7 +25,7 @@ jobs: run: ls -la - name: "✏️ Generate release changelog" id: changelog - uses: janheinrichmerker/action-github-changelog-generator@v2.3 + uses: janheinrichmerker/action-github-changelog-generator@v2.4 with: token: ${{ secrets.GITHUB_TOKEN }} sinceTag: v14.7.1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 38705d15..8d04e6a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: merge-multiple: true - name: "✏️ Generate release changelog" id: changelog - uses: janheinrichmerker/action-github-changelog-generator@v2.3 + uses: janheinrichmerker/action-github-changelog-generator@v2.4 with: token: ${{ secrets.GITHUB_TOKEN }} sinceTag: v14.7.1 From 649c86d83fb63c76d57b46533174482c35683711 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 12:46:51 +0000 Subject: [PATCH 9/9] Change nightly release title from "Nightly Release" to "Nightly mdev Build" Updated the release name in nightly.yml to better reflect that this is a development build (mdev) rather than a production release. Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com> --- .github/workflows/nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 91213955..e506cdc4 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -37,7 +37,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: nightly - name: 'Nightly Release $$' + name: 'Nightly mdev Build $$' prerelease: true body: ${{ steps.changelog.outputs.changelog }} files: |