96 lines
2.4 KiB
YAML
96 lines
2.4 KiB
YAML
---
|
|
env:
|
|
nightly_upload_url: 'https://uploads.github.com/repos/EdgeTX/edgetx/releases/43479380/assets{?name,label}'
|
|
nightly_release_id: 43479380
|
|
|
|
name: Build and deploy nightly release
|
|
on:
|
|
push:
|
|
branches: [ 2.4 ]
|
|
schedule:
|
|
- cron: '0 2 * * *' # run at 2 AM UTC
|
|
|
|
jobs:
|
|
metadata:
|
|
name: Store metadata
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v2
|
|
- name: Package common files
|
|
uses: 'actions/upload-artifact@v2'
|
|
with:
|
|
name: edgetx-firmware-nightly
|
|
path: |
|
|
fw.json
|
|
LICENSE
|
|
README.md
|
|
|
|
build:
|
|
name: Build firmware
|
|
runs-on: ubuntu-latest
|
|
needs: metadata
|
|
strategy:
|
|
matrix:
|
|
target:
|
|
- T12
|
|
- T16
|
|
- T8
|
|
- TLITE
|
|
- TX12
|
|
- TX16S
|
|
- X10
|
|
- X12S
|
|
- X7
|
|
- X9DP
|
|
- X9DP2019
|
|
- X9LITE
|
|
- XLITE
|
|
container:
|
|
image: ghcr.io/edgetx/edgetx-commit-tests
|
|
volumes:
|
|
- ${{ github.workspace }}:/src
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
- name: Build firmware ${{ matrix.target }}
|
|
env:
|
|
FLAVOR: ${{ matrix.target }}
|
|
run: ./tools/build-gh.sh
|
|
|
|
- name: Package firmware ${{ matrix.target }}
|
|
uses: 'actions/upload-artifact@v2'
|
|
with:
|
|
name: edgetx-firmware-nightly
|
|
path: "${{ github.workspace }}/*.bin"
|
|
retention-days: 15
|
|
if-no-files-found: error
|
|
|
|
deploy:
|
|
name: Deploy release
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: edgetx-firmware-nightly
|
|
path: edgetx-firmware-nightly
|
|
|
|
- name: Package files
|
|
run: tar -cvzf edgetx-firmware-nightly.tgz ./edgetx-firmware-nightly
|
|
|
|
- name: Deploy release
|
|
uses: WebFreak001/deploy-nightly@master
|
|
env:
|
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
with:
|
|
upload_url: "${{ env.nightly_upload_url }}"
|
|
release_id: "${{ env.nightly_release_id }}"
|
|
asset_path: edgetx-firmware-nightly.tgz
|
|
asset_name: "edgetx-firmware-nightly-$$.tgz"
|
|
asset_content_type: application/gzip
|
|
max_releases: 15
|