Skip to content

Only build selected repeaters for now #7

Only build selected repeaters for now

Only build selected repeaters for now #7

name: Build DMC Repeater Firmwares
permissions:
contents: write
on:
workflow_dispatch:
push:
tags:
- 'dmc-repeater-*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone Repo
uses: actions/checkout@v6
- name: Setup Build Environment
uses: ./.github/actions/setup-build-environment
- name: Build Firmwares
env:
FIRMWARE_VERSION: ${{ env.GIT_TAG_VERSION }}
run: /usr/bin/env bash build.sh build-dmc-repeater-firmwares
- name: Upload Workflow Artifacts
uses: actions/upload-artifact@v7
with:
name: dmc-repeater-firmwares
path: out
# Release runs as a separate job so that a flaky asset upload can be
# re-run on its own (downloading the already-built artifact) without
# recompiling all firmwares.
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
# GITHUB_ENV does not carry across jobs, so re-derive the version here.
# a git tag of "dmc-repeater-v1.2.3" sets "v1.2.3" as GIT_TAG_VERSION
- name: Extract Version from Git Tag
run: |
GIT_TAG_NAME="${GITHUB_REF#refs/tags/}"
echo "GIT_TAG_VERSION=${GIT_TAG_NAME##*-}" >> $GITHUB_ENV
- name: Download Firmware Artifacts
uses: actions/download-artifact@v7
with:
name: dmc-repeater-firmwares
path: out
- name: Create Release
uses: softprops/action-gh-release@v3
with:
name: DMC Repeater Firmware ${{ env.GIT_TAG_VERSION }}
body: ""
draft: true
files: out/*