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.
This commit is contained in:
DanConwayDev
2026-09-03 13:47:09 +00:00
parent 6162dd41b7
commit 7533e369d3
2 changed files with 7 additions and 1 deletions
+7
View File
@@ -74,6 +74,12 @@ jobs:
printf '%s\n' "$NGIT_PUBLISHER_NBUNKSEC" > "$signer_file" printf '%s\n' "$NGIT_PUBLISHER_NBUNKSEC" > "$signer_file"
version="${GITHUB_REF_NAME#v}" version="${GITHUB_REF_NAME#v}"
if [[ "$version" == *-* ]]; then
prerelease="${version#*-}"
channel="${prerelease%%[.+]*}"
else
channel=main
fi
released_at="$(git for-each-ref \ released_at="$(git for-each-ref \
--format='%(creatordate:unix)' \ --format='%(creatordate:unix)' \
"refs/tags/$GITHUB_REF_NAME")" "refs/tags/$GITHUB_REF_NAME")"
@@ -84,6 +90,7 @@ jobs:
ngit release publish "$version" \ ngit release publish "$version" \
--repo nostr://npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/relay.ngit.dev/ngit-grasp \ --repo nostr://npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/relay.ngit.dev/ngit-grasp \
--manifest .ngit/release.yaml \ --manifest .ngit/release.yaml \
--channel "$channel" \
--tag "$GITHUB_REF_NAME" \ --tag "$GITHUB_REF_NAME" \
--released-at "$released_at" \ --released-at "$released_at" \
--nbunksec-file "$signer_file" \ --nbunksec-file "$signer_file" \
-1
View File
@@ -19,7 +19,6 @@ license: MIT
website: https://gitworkshop.dev/danconwaydev.com/ngit-grasp website: https://gitworkshop.dev/danconwaydev.com/ngit-grasp
repository: nostr://npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/relay.ngit.dev/ngit-grasp repository: nostr://npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/relay.ngit.dev/ngit-grasp
icon: static/icon.png icon: static/icon.png
channel: main
release_notes: CHANGELOG.md release_notes: CHANGELOG.md
publication: publication:
blossom_servers: blossom_servers: