gostations/release.sh
Greg Gauthier 81935c44e6
All checks were successful
CI / Test (push) Successful in 55s
CI / Build (push) Successful in 42s
chore(release): update post-tag messages for automated workflow
Update the echo instructions shown after pushing a tag to reflect that the Gitea Actions 'Release' workflow now handles building, checksumming, and auto-creating the release via the API, rather than requiring manual release creation. Include notes about monitoring the Actions tab and improved error visibility.
2026-06-06 08:28:28 +01:00

97 lines
3.7 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# release.sh — One-command release driver for gostations (modeled on grokkit)
# Usage: ./release.sh v2.0.0
#
# This will:
# - Create the git tag (so downstream CI/release can see it)
# - Help generate/update CHANGELOG (via grokkit if available)
# - Commit the changes
# - Push tag + commit
# - Print suggested Gitea release notes body
set -euo pipefail
VERSION="${1:-}"
if [[ -z "$VERSION" || ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)? ]]; then
echo "❌ Usage: $0 vX.Y.Z"
echo " Example: $0 v2.0.0"
exit 1
fi
echo "🚀 Starting release process for gostations $VERSION..."
# Safety check: clean working tree
if [[ -n $(git status --porcelain) ]]; then
echo "❌ Working tree is dirty. Commit or stash changes first."
exit 1
fi
# Final human confirmation
echo ""
echo "This will:"
echo " 1. Create git tag $VERSION"
echo " 2. (If grokkit available) Run grokkit changelog + commit for CHANGELOG.md"
echo " 3. Push the commit + tag"
echo " 4. Print ready-to-paste text for the Gitea release page"
echo ""
read -p "Proceed with release $VERSION? (y/N) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Aborted."
exit 1
fi
# 1. Create the tag early (CI release workflow triggers on tag)
echo "🏷️ Creating tag $VERSION..."
git tag "$VERSION"
# 2. Changelog / release prep (best effort using grokkit if present on PATH)
if command -v grokkit >/dev/null 2>&1; then
echo "📝 Generating/updating CHANGELOG.md via grokkit..."
grokkit changelog --version "$VERSION" || echo "⚠️ grokkit changelog returned non-zero (continuing)"
if [[ -n $(git status --porcelain -- CHANGELOG.md) ]]; then
echo "📦 Committing changelog changes via grokkit..."
git add CHANGELOG.md
grokkit commit || echo "⚠️ grokkit commit may need manual follow-up"
fi
else
echo " grokkit not found on PATH. Skipping automated changelog."
echo " You can manually edit CHANGELOG.md before the next steps if desired."
echo " Then run: git add CHANGELOG.md && git commit -m 'chore(release): $VERSION'"
fi
# 3. Push (tag was created earlier; push any new commit + tags)
echo "📤 Pushing commit (if any) + tag..."
git push || true
git push --tags
# 4. Print nice release notes for Gitea
echo ""
echo "✅ Release $VERSION pushed!"
echo ""
echo "📋 Copy-paste the following into the Gitea release notes body:"
echo "------------------------------------------------------------"
make -s release-notes VERSION="$VERSION" || cat <<EOF
## gostations ${VERSION}
New major release: full modern TUI (Bubble Tea) is now the default.
- Two-stage UI: station browser → dedicated playback view (Winamp-inspired)
- Live stream metadata display
- Playback controls: skip, volume (↑/↓ + vertical bar), mute, play/pause, stop (returns to list)
- mpv JSON IPC for responsive controls + metadata (no terminal takeover)
- Favorites (★) management in both TUI and CLI (fav list/add/del [index])
- Server-side search on ENTER while filtering
- Legacy wmenu UI still available via --legacy (for now)
- All previous CLI subcommands (find, play, fav) preserved
See the commit history and updated README for details.
EOF
echo "------------------------------------------------------------"
echo ""
echo "🎉 Tag pushed! The Gitea Actions 'Release' workflow should now be running (triggered by the tag push)."
echo " It will build cross-platform tarballs, checksums, copy install scripts, and auto-create the release + upload assets via the API."
echo " Monitor the run in the Actions tab for tag $VERSION. The new error handling will make any create/upload issues visible in logs (with API response)."
echo " Once green, the release with packages should appear on the Releases page."