Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ name: PlatformIO CI
# Only included into other workflows
on:
workflow_call:
inputs:
nightly_build:
description: 'Flag to indicate this is a nightly build'
required: false
type: boolean
default: false

jobs:

Expand Down Expand Up @@ -62,6 +68,7 @@ jobs:
- name: Build firmware
env:
WLED_RELEASE: True
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
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
jobs:
wled_build:
uses: ./.github/workflows/build.yml
with:
nightly_build: true
nightly:
name: Deploy nightly
runs-on: ubuntu-latest
Expand All @@ -23,19 +25,19 @@ 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
# 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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly
name: 'Nightly Release $$'
name: 'Nightly mdev Build $$'
prerelease: true
body: ${{ steps.changelog.outputs.changelog }}
files: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ 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
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:
Expand Down
11 changes: 11 additions & 0 deletions pio-scripts/set_nightly_version.py
Original file line number Diff line number Diff line change
@@ -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"-DWLED_BUILD_VERSION={version_code}"])
print(f"Nightly build: Setting VERSION to {version_code}")

1 change: 1 addition & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions wled00/wled.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down