149 lines
4.4 KiB
YAML
149 lines
4.4 KiB
YAML
---
|
|
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@v6
|
|
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@v7
|
|
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@v6
|
|
with:
|
|
fetch-depth: 0 # Need full history for changelog
|
|
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v8
|
|
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
|
|
echo "old_nightly_sha=$(git rev-parse nightly)" >> $GITHUB_ENV
|
|
|
|
- name: Zip release file
|
|
uses: montudor/action-zip@v1
|
|
with:
|
|
args: zip -qq -j -r ${{ env.release_filename }} ./edgetx-firmware-nightly
|
|
|
|
- name: Generate changelog
|
|
id: changelog
|
|
uses: orhun/git-cliff-action@v4
|
|
with:
|
|
config: cliff.toml
|
|
args: --verbose --strip all nightly..HEAD
|
|
env:
|
|
OUTPUT: CHANGELOG.md
|
|
|
|
- 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 #softprops/action-gh-release/pull/670 or v3 to clear nodejs log warning
|
|
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.changelog.outputs.content }}
|
|
|
|
---
|
|
**Full Diff:** https://github.com/${{ github.repository }}/compare/${{ env.old_nightly_sha }}...${{ github.sha }}
|
|
files: |
|
|
${{ env.release_filename }}
|