2022-01-09 22:42:42 +00:00
|
|
|
# You'll need to setup the follwing environment variables:
|
2022-02-17 10:17:00 +00:00
|
|
|
# env.repo_nightly - The repository to release nightly builds to e.g. betaflight-configurator-nightly
|
|
|
|
# env.release_notes - The release notes to be published as part of the github release
|
|
|
|
# env.debug_release_notes - The release notes to be published as part of the github debug release
|
2022-01-09 22:42:42 +00:00
|
|
|
# secrets.REPO_TOKEN - A GitHub token with permissions to push and publish releases to the nightly repo
|
|
|
|
|
|
|
|
env:
|
2022-02-17 10:17:00 +00:00
|
|
|
repo_nightly: betaflight/betaflight-configurator-nightlies
|
|
|
|
debug_release_notes: >
|
2022-01-09 22:42:42 +00:00
|
|
|
This is an automated development build.
|
|
|
|
It may be unstable and result in corrupted configurations or data loss.
|
|
|
|
**Use only for testing.**
|
2022-02-17 10:17:00 +00:00
|
|
|
release_notes: This is a release build. It does not contain the debug console.
|
2022-01-09 22:42:42 +00:00
|
|
|
|
2022-02-01 22:31:12 +00:00
|
|
|
name: Nightly
|
2022-01-09 22:42:42 +00:00
|
|
|
|
|
|
|
on:
|
2022-01-30 05:41:23 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- '*-maintenance'
|
2022-01-09 22:42:42 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-01-30 05:41:23 +00:00
|
|
|
ci:
|
|
|
|
name: CI
|
|
|
|
uses: ./.github/workflows/ci.yml
|
2022-02-17 10:17:00 +00:00
|
|
|
with:
|
|
|
|
debug_build: true
|
2022-01-30 05:41:23 +00:00
|
|
|
|
2022-02-01 22:31:12 +00:00
|
|
|
release:
|
2022-02-17 10:17:00 +00:00
|
|
|
name: Nightly release
|
2022-01-30 05:41:23 +00:00
|
|
|
needs: ci
|
2022-05-03 00:52:44 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2022-01-09 22:42:42 +00:00
|
|
|
steps:
|
2022-01-30 05:41:23 +00:00
|
|
|
- name: Fetch build artifacts
|
|
|
|
uses: actions/download-artifact@v2
|
2022-01-09 22:42:42 +00:00
|
|
|
with:
|
|
|
|
path: release-assets/
|
|
|
|
|
|
|
|
- name: Select release notes
|
|
|
|
id: notes
|
|
|
|
run: |
|
|
|
|
set -- release-assets/Betaflight-Configurator-Debug-*
|
2022-04-14 10:30:16 +00:00
|
|
|
echo "::set-output name=notes::$(test -e "$1" && echo '${{ env.debug_release_notes }}' || echo '${{ env.release_notes }}')"
|
2022-01-09 22:42:42 +00:00
|
|
|
|
2022-02-13 17:35:10 +00:00
|
|
|
- name: Get current date
|
|
|
|
id: date
|
|
|
|
run: echo "::set-output name=today::$(date '+%Y%m%d')"
|
|
|
|
|
2022-01-09 22:42:42 +00:00
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 # v0.1.14
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.REPO_TOKEN }}
|
2022-02-17 10:17:00 +00:00
|
|
|
repository: ${{ env.repo_nightly }}
|
2022-02-13 17:35:10 +00:00
|
|
|
tag_name: v${{ steps.date.outputs.today }}.${{ github.run_number }}
|
2022-01-09 22:42:42 +00:00
|
|
|
files: release-assets/Betaflight-Configurator-*/**
|
|
|
|
draft: false
|
2022-02-20 13:02:06 +00:00
|
|
|
prerelease: false
|
2022-01-09 22:42:42 +00:00
|
|
|
fail_on_unmatched_files: true
|
|
|
|
body: |
|
|
|
|
${{ steps.notes.outputs.notes }}
|
|
|
|
|
|
|
|
### Repository:
|
|
|
|
${{ github.repository }} ([link](${{ github.event.repository.html_url }}))
|
|
|
|
|
|
|
|
### Branch:
|
|
|
|
${{ github.ref_name }} ([link](${{ github.event.repository.html_url }}/tree/${{ github.ref_name }}))
|
|
|
|
|
|
|
|
### Latest changeset:
|
2022-02-13 17:06:15 +00:00
|
|
|
${{ github.event.head_commit.id }} ([link](${{ github.event.head_commit.url }}))
|
2022-01-09 22:42:42 +00:00
|
|
|
|
|
|
|
### Changes:
|
2022-02-13 17:06:15 +00:00
|
|
|
${{ github.event.head_commit.message }}
|