From 7533e369d36275d77bffc797acb8fc200cd4d12a Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 3 Sep 2026 13:47:09 +0000 Subject: [PATCH] ci(release): derive prerelease publication channel Derive the NIP-82 channel from the first prerelease identifier in the tagged version, while retaining main for stable versions. Pass the result explicitly to ngit so rc, beta, and similarly named channels are not mislabeled by the manifest default. The application metadata and publication targets are unchanged. This deliberately does not trigger or otherwise rehearse a production release. Validated with actionlint, yq, git diff --check, and stable/rc/beta/nightly derivation examples. --- .ngit/act/workflows/release.yaml | 7 +++++++ .ngit/release.yaml | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.ngit/act/workflows/release.yaml b/.ngit/act/workflows/release.yaml index 909d30a..521ff61 100644 --- a/.ngit/act/workflows/release.yaml +++ b/.ngit/act/workflows/release.yaml @@ -74,6 +74,12 @@ jobs: printf '%s\n' "$NGIT_PUBLISHER_NBUNKSEC" > "$signer_file" version="${GITHUB_REF_NAME#v}" + if [[ "$version" == *-* ]]; then + prerelease="${version#*-}" + channel="${prerelease%%[.+]*}" + else + channel=main + fi released_at="$(git for-each-ref \ --format='%(creatordate:unix)' \ "refs/tags/$GITHUB_REF_NAME")" @@ -84,6 +90,7 @@ jobs: ngit release publish "$version" \ --repo nostr://npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/relay.ngit.dev/ngit-grasp \ --manifest .ngit/release.yaml \ + --channel "$channel" \ --tag "$GITHUB_REF_NAME" \ --released-at "$released_at" \ --nbunksec-file "$signer_file" \ diff --git a/.ngit/release.yaml b/.ngit/release.yaml index f1832d4..7745305 100644 --- a/.ngit/release.yaml +++ b/.ngit/release.yaml @@ -19,7 +19,6 @@ license: MIT website: https://gitworkshop.dev/danconwaydev.com/ngit-grasp repository: nostr://npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/relay.ngit.dev/ngit-grasp icon: static/icon.png -channel: main release_notes: CHANGELOG.md publication: blossom_servers: