Skip to content

Commit 14152af

Browse files
authored
Merge pull request #461 from klutvott123/fix-nightly
Fix nightly build
2 parents 10954d4 + 331d547 commit 14152af

File tree

3 files changed

+73
-5
lines changed

3 files changed

+73
-5
lines changed

.github/workflows/build-release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
release:
1515
name: Release
1616
needs: ci
17-
runs-on: ubuntu-20.04
17+
runs-on: ubuntu-22.04
1818
steps:
1919
- name: Code Checkout
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v3
2121

2222
- name: Fetch build artifacts
23-
uses: actions/download-artifact@v2
23+
uses: actions/download-artifact@v3
2424

2525
- name: List assets
2626
run: ls -al Assets

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ on:
1616
jobs:
1717
build:
1818
name: Build
19-
runs-on: ubuntu-20.04
19+
runs-on: ubuntu-22.04
2020
steps:
2121
- name: Code Checkout
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
2323

2424
- name: Install Lua
2525
run: sudo apt-get -y install lua5.2

.github/workflows/nightly.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# You'll need to setup the follwing environment variables:
2+
# env.repo_nightly - The repository to release nightly builds to e.g. betaflight-tx-lua-scripts-nightlies
3+
# env.release_notes - The release notes to be published as part of the github release
4+
# env.debug_release_notes - The release notes to be published as part of the github debug release
5+
# secrets.REPO_TOKEN - A GitHub token with permissions to push and publish releases to the nightly repo
6+
7+
env:
8+
repo_nightly: betaflight/betaflight-tx-lua-scripts-nightlies
9+
debug_release_notes: >
10+
This is an automated development build.
11+
It may be unstable and result in corrupted configurations or data loss.
12+
**Use only for testing.**
13+
release_notes: This is a release build.
14+
15+
name: Nightly
16+
17+
on:
18+
push:
19+
branches:
20+
- master
21+
22+
jobs:
23+
ci:
24+
name: CI
25+
uses: ./.github/workflows/ci.yml
26+
with:
27+
release_build: false
28+
29+
release:
30+
name: Nightly release
31+
needs: ci
32+
runs-on: ubuntu-22.04
33+
steps:
34+
- name: Code Checkout
35+
uses: actions/checkout@v3
36+
37+
- name: Fetch build artifacts
38+
uses: actions/download-artifact@v3
39+
40+
- name: Select release notes
41+
id: notes
42+
run: |
43+
set -- Assets/*.zip
44+
echo "notes=$(test -e "$1" && echo '${{ env.debug_release_notes }}' || echo '${{ env.release_notes }}')" >> $GITHUB_OUTPUT
45+
- name: Get current date
46+
id: date
47+
run: echo "today=$(date '+%Y%m%d')" >> $GITHUB_OUTPUT
48+
49+
- name: Release
50+
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 # v0.1.14
51+
with:
52+
token: ${{ secrets.REPO_TOKEN }}
53+
repository: ${{ env.repo_nightly }}
54+
tag_name: v${{ steps.date.outputs.today }}.${{ github.run_number }}
55+
files: Assets/*.zip
56+
draft: false
57+
prerelease: false
58+
fail_on_unmatched_files: true
59+
body: |
60+
${{ steps.notes.outputs.notes }}
61+
### Repository:
62+
${{ github.repository }} ([link](${{ github.event.repository.html_url }}))
63+
### Branch:
64+
${{ github.ref_name }} ([link](${{ github.event.repository.html_url }}/tree/${{ github.ref_name }}))
65+
### Latest changeset:
66+
${{ github.event.head_commit.id }} ([link](${{ github.event.head_commit.url }}))
67+
### Changes:
68+
${{ github.event.head_commit.message }}

0 commit comments

Comments
 (0)