diff --git a/.github/workflows/pub-release.yml b/.github/workflows/pub-release.yml index 0b2e6e59..0eaf8858 100644 --- a/.github/workflows/pub-release.yml +++ b/.github/workflows/pub-release.yml @@ -56,6 +56,10 @@ name: pub-release description: "dry run only: take delta bases from this repo's releases instead (testing the delta path)" required: false default: "" + only: + description: "dry run only: build just these artifacts (e.g. Xiao_nrf52_repeater-ota), space separated" + required: false + default: "" concurrency: group: pub-release @@ -155,6 +159,7 @@ jobs: TOKEN: ${{ secrets.GITEA_TOKEN || github.token }} DRY: ${{ github.event.inputs.dry_run }} BASES_REPO: ${{ github.event.inputs.bases_repo }} + ONLY: ${{ github.event.inputs.only }} run: | set -euo pipefail source .github/fw-flags.sh @@ -170,6 +175,7 @@ jobs: echo '{}' >"$dist/manifest.json" # earlier public releases (newest first): delta bases for the -ota images [ "$DRY" = "true" ] && [ -n "$BASES_REPO" ] && PUB_REPO=$BASES_REPO + [ "$DRY" = "true" ] || ONLY="" # a real release always builds everything api="$GITEA/api/v1/repos/$PUB_REPO" auth="header = \"Authorization: token $TOKEN\"" bases="$RUNNER_TEMP/bases" @@ -213,6 +219,7 @@ jobs: # appends PLATFORMIO_BUILD_FLAGS after each env's flags: last -D wins build() { local env=$1 suffix=$3 variant=${4:-} b v + if [ -n "$ONLY" ] && [[ " $ONLY " != *" $env$suffix "* ]]; then return 0; fi echo "::group::$env$suffix" FW_OTA_VARIANT=$variant PLATFORMIO_BUILD_FLAGS="$PUB_FLAGS $2" pio run -e "$env" b=".pio/build/$env"