Skip to content

Commit 710282f

Browse files
committed
add option to include stable or nightly fujinet build
1 parent 5d5eb06 commit 710282f

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
description: 'Prepare release bundle (adds tag)'
1212
type: boolean
1313
default: false
14+
useNightlyFujiNet:
15+
description: 'Bundle latest nightly FujiNet-PC release instead of latest stable release'
16+
type: boolean
17+
default: false
1418
doRelease:
1519
description: 'Create GitHub Release'
1620
type: boolean
@@ -201,8 +205,18 @@ jobs:
201205
# run: |
202206
# python fujinet-pc-launcher/launcher/download_release.py "fujinet-pc_*_${{ matrix.target }}.*"
203207

204-
- name: 'Download FujiNet-PC nightly release'
205-
if: ${{ github.event.inputs.releaseBuild == 'true' }}
208+
- name: 'Download latest FujiNet-PC stable release'
209+
if: ${{ github.event.inputs.releaseBuild == 'true' && github.event.inputs.useNightlyFujiNet == 'false' }}
210+
env:
211+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
212+
run: |
213+
gh release list --json tagName,createdAt \
214+
--jq 'map(select(.tagName | test("^v[0-9]+\\.[0-9]+"))) | sort_by(.createdAt)[-1].tagName' \
215+
--repo github.com/FujiNetWIFI/fujinet-firmware |\
216+
xargs -I% sh -c 'echo Downloading %; gh release download % --repo github.com/FujiNetWIFI/fujinet-firmware'
217+
218+
- name: 'Download latest FujiNet-PC nightly release'
219+
if: ${{ github.event.inputs.releaseBuild == 'true' && github.event.inputs.useNightlyFujiNet == 'true' }}
206220
env:
207221
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
208222
run: |

0 commit comments

Comments
 (0)