Commit c1d1fa3

mo khan <mo@mokhan.ca>
2025-07-03 00:46:21
feat: add release infrastructure and installation methods
- Add GitHub Actions workflow for cross-platform binary releases - Create install.sh script for one-liner installation - Update README with multiple installation options - Support Linux, macOS (x86_64 + arm64), and Windows builds πŸ€– Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5a0a1c7
Changed files (3)
.github/workflows/release.yml
@@ -0,0 +1,77 @@
+name: Release
+
+on:
+  push:
+    tags:
+      - 'v*'
+
+jobs:
+  build:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        include:
+          - os: ubuntu-latest
+            target: x86_64-unknown-linux-gnu
+            name: ghetto-blaster-linux-x86_64
+          - os: macos-latest
+            target: x86_64-apple-darwin
+            name: ghetto-blaster-macos-x86_64
+          - os: macos-latest
+            target: aarch64-apple-darwin
+            name: ghetto-blaster-macos-arm64
+          - os: windows-latest
+            target: x86_64-pc-windows-msvc
+            name: ghetto-blaster-windows-x86_64
+            ext: .exe
+
+    steps:
+    - uses: actions/checkout@v4
+    
+    - name: Install Rust
+      uses: dtolnay/rust-toolchain@stable
+      with:
+        targets: ${{ matrix.target }}
+    
+    - name: Install system dependencies (Linux)
+      if: matrix.os == 'ubuntu-latest'
+      run: |
+        sudo apt-get update
+        sudo apt-get install -y libasound2-dev pkg-config
+    
+    - name: Install system dependencies (macOS)
+      if: matrix.os == 'macos-latest'
+      run: |
+        # macOS has CoreAudio built-in
+        echo "No additional dependencies needed for macOS"
+    
+    - name: Build
+      run: cargo build --release --target ${{ matrix.target }}
+    
+    - name: Package binary (Unix)
+      if: matrix.os != 'windows-latest'
+      run: |
+        cd target/${{ matrix.target }}/release
+        tar czf ../../../${{ matrix.name }}.tar.gz ghetto-blaster
+    
+    - name: Package binary (Windows)
+      if: matrix.os == 'windows-latest'
+      run: |
+        cd target/${{ matrix.target }}/release
+        7z a ../../../${{ matrix.name }}.zip ghetto-blaster.exe
+    
+    - name: Upload Release Asset (Unix)
+      if: matrix.os != 'windows-latest'
+      uses: softprops/action-gh-release@v1
+      with:
+        files: ${{ matrix.name }}.tar.gz
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+    
+    - name: Upload Release Asset (Windows)
+      if: matrix.os == 'windows-latest'
+      uses: softprops/action-gh-release@v1
+      with:
+        files: ${{ matrix.name }}.zip
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
install.sh
@@ -0,0 +1,54 @@
+#!/bin/bash
+set -e
+
+# Ghetto Blaster installer script
+REPO="xlgmokha/ghetto-blaster"
+BINARY_NAME="ghetto-blaster"
+
+# Detect OS and architecture
+OS=$(uname -s | tr '[:upper:]' '[:lower:]')
+ARCH=$(uname -m)
+
+case $OS in
+    linux)
+        case $ARCH in
+            x86_64) TARGET="linux-x86_64" ;;
+            *) echo "Unsupported architecture: $ARCH"; exit 1 ;;
+        esac
+        ;;
+    darwin)
+        case $ARCH in
+            x86_64) TARGET="macos-x86_64" ;;
+            arm64) TARGET="macos-arm64" ;;
+            *) echo "Unsupported architecture: $ARCH"; exit 1 ;;
+        esac
+        ;;
+    *)
+        echo "Unsupported OS: $OS"
+        exit 1
+        ;;
+esac
+
+echo "🎡 Installing Ghetto Blaster for $OS ($ARCH)..."
+
+# Get latest release
+LATEST_RELEASE=$(curl -s "https://api.github.com/repos/$REPO/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
+DOWNLOAD_URL="https://github.com/$REPO/releases/download/$LATEST_RELEASE/$BINARY_NAME-$TARGET.tar.gz"
+
+echo "πŸ“¦ Downloading $LATEST_RELEASE..."
+curl -L "$DOWNLOAD_URL" -o "/tmp/$BINARY_NAME.tar.gz"
+
+echo "πŸ“‚ Extracting..."
+cd /tmp
+tar -xzf "$BINARY_NAME.tar.gz"
+
+echo "πŸ”§ Installing to /usr/local/bin..."
+sudo mv "$BINARY_NAME" /usr/local/bin/
+sudo chmod +x "/usr/local/bin/$BINARY_NAME"
+
+echo "βœ… Installation complete!"
+echo ""
+echo "🎧 Run with: ghetto-blaster"
+echo "πŸ“– Config: ~/.config/ghetto-blaster.yml"
+echo ""
+echo "πŸŽ‰ Enjoy your music!"
\ No newline at end of file
README.md
@@ -4,23 +4,38 @@ A terminal-based podcast player with vim-style keybindings, built in Rust with r
 
 ## Features
 
-- **TUI Interface**: Clean, terminal-based interface with vim-style navigation
-- **Podcast Feeds**: Subscribe to RSS/XML podcast feeds
-- **mpv Integration**: High-quality audio playback with on-screen controls
-- **Configuration**: YAML-based configuration file
-- **Cross-platform**: Works on macOS, Linux, and Windows
-
-## Prerequisites
-
-- **Rust**: Install from [rustup.rs](https://rustup.rs/)
-- **mpv**: Audio player (`brew install mpv` on macOS, `apt install mpv` on Ubuntu)
+- 🎡 **Native Rust Audio**: No external dependencies (mpv not required!)
+- ⚑ **Instant Startup**: Async RSS loading with real-time feed updates
+- πŸ’Ύ **Offline Caching**: Episodes cache to `~/Music/{feed}/` for instant replay
+- πŸŽ›οΈ **Winamp-inspired Media Console**: Real-time controls, volume, seek, progress
+- πŸ“± **Smart Feed Management**: Loading indicators (⟳ Loading, βœ“ Loaded, βœ— Error)
+- πŸ’ΎπŸŒ **Cache Indicators**: See which episodes are cached vs streaming
+- ⌨️ **Vim-style Navigation**: hjkl movement, space for pause, ESC to go back
+- πŸ”„ **Background Loading**: TUI appears instantly while feeds load
+- πŸ“Š **Real-time UI**: Progress tracking, volume control, playback status
+- πŸ–₯️ **Cross-platform**: Works on macOS, Linux, and Windows
+
+## Quick Install
+
+### One-liner (recommended)
+```bash
+curl -sSL https://raw.githubusercontent.com/xlgmokha/ghetto-blaster/main/install.sh | bash
+```
 
-## Installation
+### GitHub Releases
+Download pre-built binaries from [Releases](https://github.com/xlgmokha/ghetto-blaster/releases)
 
+### From Source
 ```bash
 git clone https://github.com/xlgmokha/ghetto-blaster
 cd ghetto-blaster
 cargo build --release
+sudo cp target/release/ghetto-blaster /usr/local/bin/
+```
+
+### Cargo Install
+```bash
+cargo install --git https://github.com/xlgmokha/ghetto-blaster
 ```
 
 ## Usage