Skip to content

Build and deploy nightly release #1718

Build and deploy nightly release

Build and deploy nightly release #1718

Workflow file for this run

---
name: Build and deploy nightly release
on:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
workflow_dispatch:
concurrency:
group: 'nightly'
cancel-in-progress: true
jobs:
build:
name: Build firmware
runs-on: ubuntu-latest
strategy:
matrix:
target:
- nv14;el18
- pl18;pl18ev;pl18u
- pa01
- t12max
- t15;t16;t18
- zorro;pocket;mt12;commando8
- tprov2;tpros;bumblebee
- t20;t20v2;t14
- tx12mk2;boxer;gx12
- tx16s
- tx16smk3
- f16
- v16
- x10;x10express
- x12s
- x7access
- x9dp2019
- x9e;x9e-hall
- mt12
- nb4p
- st16
- tx15
- t15pro
container:
image: ghcr.io/edgetx/edgetx-dev:latest
volumes:
- ${{ github.workspace }}:/src
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build firmware ${{ matrix.target }}
env:
FLAVOR: ${{ matrix.target }}
EDGETX_VERSION_SUFFIX: nightly
CMAKE_BUILD_PARALLEL_LEVEL: 4
run: ./tools/build-gh.sh
- name: Package firmware ${{ matrix.target }}
uses: actions/upload-artifact@v4
with:
name: edgetx-firmware-nightly-${{ matrix.target }}
path: |
fw.json
LICENSE
*.bin
*.uf2
retention-days: 15
if-no-files-found: error
deploy:
name: Deploy release
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # Need full history for changelog
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: edgetx-firmware-nightly-*
path: edgetx-firmware-nightly
merge-multiple: true
- name: Compose release filename
run: |
echo "release_filename=edgetx-firmware-nightly-${GITHUB_SHA::8}.zip" >> $GITHUB_ENV
echo "build_date=$(date -u +'%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_ENV
- name: Zip release file
uses: montudor/action-zip@v1
with:
args: zip -qq -j -r ${{ env.release_filename }} ./edgetx-firmware-nightly
- name: Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v6
with:
mode: "HYBRID"
configurationJson: |
{
"categories": [
{
"title": "## 🖥️ Black & White Radio Changes",
"labels": ["scope:bw"]
},
{
"title": "## 🎨 Color Radio Changes",
"labels": ["scope:color"]
},
{
"title": "## 🎮 Firmware (All Radios Generally)",
"labels": ["scope:firmware", "scope:fw"]
},
{
"title": "## 💻 Companion Software Changes",
"labels": ["scope:cpn", "companion"]
},
{
"title": "## 🚀 Features",
"labels": ["feat", "enhancement ✨"]
},
{
"title": "## 🐛 Fixes",
"labels": ["fix", "bugfix", "bug 🪲", "bug/regression ↩️"]
},
{
"title": "## 🧹 Chores",
"labels": ["chore", "house keeping 🧹"]
},
{
"title": "## 🔧 CI/CD",
"labels": ["ci", "ci/cd 🔧"]
},
{
"title": "## 🧪 Tests",
"labels": ["scope:test", "test", "unit tests 🧪"]
},
{
"title": "## 📝 Documentation",
"labels": ["scope:docs", "docs", "documentation 📝"]
},
{
"title": "## 🔨 Refactoring",
"labels": ["refactor"]
},
{
"title": "## 🎨 Style",
"labels": ["style"]
},
{
"title": "## 📦 Other",
"labels": []
}
],
"template": "#{{CHANGELOG}}",
"pr_template": "- #{{TITLE}} (##{{NUMBER}})",
"commit_template": "- #{{TITLE}} (#{{MERGE_SHA}})",
"empty_template": "- No changes",
"label_extractor": [
{
"pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\\([^)]+\\))?(!)?:",
"on_property": "title",
"target": "$1"
},
{
"pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)\\(([^)]+)\\)",
"on_property": "title",
"target": "scope:$2"
}
]
}
toTag: HEAD
fromTag: nightly
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update nightly tag
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git tag -f nightly
git push -f origin nightly
- name: Delete previous nightly release
run: |
# Delete the existing nightly release to avoid accumulating assets
gh release delete nightly --yes || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy nightly release
uses: softprops/action-gh-release@v2
with:
tag_name: nightly
prerelease: true
name: "Nightly Build"
body: |
## Automated Nightly Build
**Commit:** ${{ github.sha }}
**Built:** ${{ env.build_date }}
This is an automated nightly build of EdgeTX firmware. These builds are for testing purposes and may contain bugs. Please be sure to report any issues you encounter!
### Installation
Download `${{ env.release_filename }}` and extract the firmware file for your radio model, or use [EdgeTX Buddy](https://buddy.edgetx.org/#/flash?version=nightly&source=releases&filters=includePrereleases) with the "Include pre-releases" Filter option enabled so you can select the "Nightly" version.
## Changes since last nightly build
${{ steps.build_changelog.outputs.changelog }}
files: |
${{ env.release_filename }}