Skip to content

Fix nightly build #461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
release:
name: Release
needs: ci
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Code Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Fetch build artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3

- name: List assets
run: ls -al Assets
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ on:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Code Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Lua
run: sudo apt-get -y install lua5.2
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# You'll need to setup the follwing environment variables:
# env.repo_nightly - The repository to release nightly builds to e.g. betaflight-tx-lua-scripts-nightlies
# 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
# secrets.REPO_TOKEN - A GitHub token with permissions to push and publish releases to the nightly repo

env:
repo_nightly: betaflight/betaflight-tx-lua-scripts-nightlies
debug_release_notes: >
This is an automated development build.
It may be unstable and result in corrupted configurations or data loss.
**Use only for testing.**
release_notes: This is a release build.

name: Nightly

on:
push:
branches:
- master

jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yml
with:
release_build: false

release:
name: Nightly release
needs: ci
runs-on: ubuntu-22.04
steps:
- name: Code Checkout
uses: actions/checkout@v3

- name: Fetch build artifacts
uses: actions/download-artifact@v3

- name: Select release notes
id: notes
run: |
set -- Assets/*.zip
echo "notes=$(test -e "$1" && echo '${{ env.debug_release_notes }}' || echo '${{ env.release_notes }}')" >> $GITHUB_OUTPUT
- name: Get current date
id: date
run: echo "today=$(date '+%Y%m%d')" >> $GITHUB_OUTPUT

- name: Release
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 # v0.1.14
with:
token: ${{ secrets.REPO_TOKEN }}
repository: ${{ env.repo_nightly }}
tag_name: v${{ steps.date.outputs.today }}.${{ github.run_number }}
files: Assets/*.zip
draft: false
prerelease: false
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:
${{ github.event.head_commit.id }} ([link](${{ github.event.head_commit.url }}))
### Changes:
${{ github.event.head_commit.message }}