-
-
Notifications
You must be signed in to change notification settings - Fork 582
149 lines (131 loc) · 4.4 KB
/
Copy pathnightly.yml
File metadata and controls
149 lines (131 loc) · 4.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
---
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;t22
- zorro;pocket;mt12;commando8
- tprov2;tpros;bumblebee
- t20;t20v2;t14
- tx12mk2;boxer;gx12
- tx16s
- tx16smk3
- f16
- v14;v14lcd;v16
- x10;x10express
- x12s
- x7access
- x9dp2019
- x9e;x9e-hall
- mt12
- nb4p
- st16
- c14
- 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 }}