Skip to content

Commit aac5fca

Browse files
author
realtag
committed
Add custom repeater binary workflow
1 parent 107b94c commit aac5fca

1 file changed

Lines changed: 73 additions & 0 deletions

File tree

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Build Custom Repeater Binaries
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
targets:
10+
description: "Space-separated PlatformIO environments, or 'all'"
11+
required: false
12+
default: "Heltec_v3_repeater heltec_v4_repeater Xiao_S3_WIO_repeater SenseCap_Solar_repeater RAK_4631_repeater"
13+
push:
14+
branches:
15+
- main
16+
- v1.15-repeater
17+
paths:
18+
- "src/**"
19+
- "examples/simple_repeater/**"
20+
- "variants/**"
21+
- "boards/**"
22+
- "tools/**"
23+
- "arch/**"
24+
- "bin/**"
25+
- "build.sh"
26+
- "platformio.ini"
27+
- ".github/actions/setup-build-environment/action.yml"
28+
- ".github/workflows/build-custom-repeater-binaries.yml"
29+
release:
30+
types:
31+
- published
32+
33+
jobs:
34+
build:
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- name: Clone Repo
39+
uses: actions/checkout@v4
40+
41+
- name: Setup Build Environment
42+
uses: ./.github/actions/setup-build-environment
43+
44+
- name: Build Firmwares
45+
env:
46+
DEFAULT_TARGETS: "Heltec_v3_repeater heltec_v4_repeater Xiao_S3_WIO_repeater SenseCap_Solar_repeater RAK_4631_repeater"
47+
REQUESTED_TARGETS: ${{ inputs.targets || '' }}
48+
run: |
49+
set -euo pipefail
50+
51+
version="${GIT_TAG_VERSION:-${GITHUB_REF_NAME}}"
52+
version="${version//\//-}"
53+
export FIRMWARE_VERSION="${version}"
54+
55+
targets="${REQUESTED_TARGETS:-$DEFAULT_TARGETS}"
56+
if [ "${targets}" = "all" ]; then
57+
/usr/bin/env bash build.sh build-repeater-firmwares
58+
else
59+
/usr/bin/env bash build.sh build-firmware ${targets}
60+
fi
61+
62+
- name: Upload Workflow Artifacts
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: custom-repeater-binaries-${{ github.run_id }}
66+
path: out/*
67+
if-no-files-found: error
68+
69+
- name: Upload Release Assets
70+
uses: softprops/action-gh-release@v2
71+
if: github.event_name == 'release'
72+
with:
73+
files: out/*

0 commit comments

Comments
 (0)