#!/bin/sh # Build, sign and publish a gateway release as GitHub release assets. # # The manifest is an asset too, so the gateway can be pointed at the stable # latest/download URL and never needs to know a version in advance. # # NOSTRINO_RELEASE_KEY=~/.config/nostrino/release.key \ # ./scripts/publish-release.sh 0.3.4 mlekudev/nostrino-releases # set -eu VERSION=${1:?usage: publish-release.sh } REPO=${2:?usage: publish-release.sh } KEY=${NOSTRINO_RELEASE_KEY:?set NOSTRINO_RELEASE_KEY to the Ed25519 private key file} OUT=${OUT:-dist} BASE="https://github.com/$REPO/releases/download/v$VERSION" OUT="$OUT" NOSTRINO_RELEASE_KEY="$KEY" ./scripts/build-release.sh "$VERSION" "$BASE" gh release create "v$VERSION" "$OUT"/* \ --repo "$REPO" \ --title "nostrino $VERSION" \ --notes "${NOTES:-Gateway release $VERSION.}"