name: Build and Release on: push: branches: - main workflow_dispatch: jobs: build: strategy: matrix: include: - os: macos-latest name: macos - os: ubuntu-latest name: linux runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v4 - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' run: | brew update brew install cmake gumbo-parser openssl ftxui cpp-httplib toml11 - name: Install dependencies (Linux) if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install -y cmake libgumbo-dev libssl-dev pkg-config g++ - name: Configure CMake (macOS) if: matrix.os == 'macos-latest' run: | cmake -B build -DCMAKE_PREFIX_PATH=/opt/homebrew -DTUT_BUILD_TESTS=OFF - name: Configure CMake (Linux) if: matrix.os == 'ubuntu-latest' run: | cmake -B build -DTUT_BUILD_TESTS=OFF - name: Build project run: | cmake --build build -j$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4) - name: Test binary run: | ./build/tut --version - name: Rename binary with platform suffix run: | mv build/tut build/tut-${{ matrix.name }} - name: Upload artifact uses: actions/upload-artifact@v4 with: name: tut-${{ matrix.name }} path: build/tut-${{ matrix.name }} release: needs: build runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout code uses: actions/checkout@v4 - name: Download all artifacts uses: actions/download-artifact@v4 with: path: artifacts - name: Generate version id: version run: | VERSION="v$(date +'%Y.%m.%d')-$(git rev-parse --short HEAD)" echo "VERSION=$VERSION" >> $GITHUB_OUTPUT - name: Create Release uses: softprops/action-gh-release@v2 with: tag_name: ${{ steps.version.outputs.VERSION }} name: Release ${{ steps.version.outputs.VERSION }} body: | Automated release for commit ${{ github.sha }} 🎉 **TUT - Terminal UI Textual Browser** A lightweight terminal browser with btop-style interface built with FTXUI. ## Features - 🎨 btop-style four-panel layout - ⚡ Fast and lightweight (~827KB binary) - ⌨️ Vim-style keyboard navigation - 🎭 Multiple color themes - 📝 TOML-based configuration ## Download - **macOS**: `tut-macos` - **Linux**: `tut-linux` ## Quick Start ```bash chmod +x tut-macos # or tut-linux ./tut-macos --help ./tut-macos https://example.com ``` ## Build from source See the [README](https://github.com/${{ github.repository }}/blob/main/README.md) for build instructions. files: | artifacts/tut-macos/tut-macos artifacts/tut-linux/tut-linux env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}