public export runs after every upstream merge; pub-release on push
Run Unit Tests / test (push) Successful in 4m3s
pub-release / release (push) Successful in 19m44s

.tth/public-export/: the export script and its rules (moved here from the
ops repo; .tth/ itself never leaves this repo). tth-upstream-sync gains
a public-export job: when the merge changed main, export with the pinned
git-filter-repo and a checksum-verified gitleaks, push with a deploy key
limited to tth-pub/meshcore-tth (secret PUB_DEPLOY_KEY, host key pinned
in .tth/public-export/known_hosts). pub-release.yml there runs on that
push and keeps the newest 5 tth- releases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-02 11:48:48 +01:00
1 parent b5a43f3966
commit f5d29b4790
1 file changed
+17 -2
+17 -2
View File
@@ -5,12 +5,17 @@
# password ("password") -- change both on the node after flashing. Nothing
# here carries a site's identity or real secrets.
#
# Release tag tth-<sha8>, titled with the stamped version (v1.18.0-tth<sha>).
# Runs on every push to main -- the export pushes there only after an
# upstream merge (private repo, tth-upstream-sync) -- and by hand.
# Release tag tth-<sha8>, titled with the stamped version (v1.18.0-tth<sha>);
# the newest KEEP releases stay, older ones are deleted.
# nRF52: .uf2 (drag onto the bootloader drive) and .zip (DFU over BLE or
# serial); ESP32: -merged.bin (fresh install at 0x0) and .bin (update).
name: pub-release
"on":
push:
branches: [main]
workflow_dispatch:
inputs:
ref:
@@ -28,6 +33,7 @@ concurrency:
env:
GITEA: https://git.rfa.cz
KEEP: 5
ENVS: >-
Xiao_nrf52_repeater Xiao_nrf52_companion_radio_ble Xiao_nrf52_room_server Xiao_nrf52_sensor
SenseCap_Solar_repeater SenseCap_Solar_companion_radio_ble
@@ -44,7 +50,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.ref }}
ref: ${{ github.event.inputs.ref || github.sha }}
- name: Commit and tag
id: src
@@ -133,3 +139,12 @@ jobs:
echo "uploaded $(basename "$f")"
done
echo "released $TAG = $VERSION (id $id)"
# keep the newest $KEEP, oldest go (with their tags)
curl -sSf --config - "$api/releases?limit=50" <<<"$auth" |
jq -r --argjson k "$KEEP" 'map(select(.tag_name | startswith("tth-")))
| sort_by(.created_at) | reverse | .[$k:][] | "\(.id) \(.tag_name)"' |
while read -r old_id old_tag; do
curl -sSf --config - -X DELETE "$api/releases/$old_id" <<<"$auth"
curl -sSf --config - -X DELETE "$api/tags/$old_tag" <<<"$auth" || true
echo "pruned $old_tag"
done