Files
WLED_MM_Infinity/.github/workflows/nightly.yml
copilot-swe-agent[bot] 8c70acad65 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>
2026-01-15 10:08:10 +00:00

67 lines
2.0 KiB
YAML

name: Deploy Nightly
on:
# This can be used to automatically publish nightlies at UTC nighttime
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
# This can be used to allow manually triggering nightlies from the web interface
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
needs: wled_build
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Show Files
run: ls -la
- name: "✏️ Generate release changelog"
id: changelog
uses: janheinrichmerker/action-github-changelog-generator@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
sinceTag: v14.7.1
# Exclude issues that were closed without resolution from changelog
exclude-labels: '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 $$'
prerelease: true
body: ${{ steps.changelog.outputs.changelog }}
files: |
*.bin
*.bin.gz
# - name: Repository Dispatch
# uses: peter-evans/repository-dispatch@v3
# with:
# repository: wled/WLED-WebInstaller
# event-type: release-nightly
# token: ${{ secrets.PAT_PUBLIC }}