From ca3cf9b6b0e47660905e5d2be147653673fc641c Mon Sep 17 00:00:00 2001 From: agileguy Date: Sat, 7 Feb 2026 11:38:42 -0700 Subject: [PATCH 1/2] Add release workflow for PyPI publishing --- .github/workflows/release.yml | 72 +++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a3310db --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,72 @@ +name: Release to PyPI + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build twine + pip install -e ".[dev]" + + - name: Run linting + run: ruff check src/ + + - name: Run type checking + run: mypy src/ + + - name: Run tests + run: pytest --tb=short + + - name: Build distribution packages + run: python -m build + + - name: Verify build artifacts + run: | + ls -lh dist/ + twine check dist/* + + - name: Extract version from tag + id: get_version + run: | + echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + name: Release ${{ steps.get_version.outputs.VERSION }} + generate_release_notes: true + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: twine upload dist/* + + - name: Verify PyPI upload + run: | + echo "✓ Package published to PyPI" + echo "Install with: pip install logview" + echo "Package URL: https://pypi.org/project/logview/" From ac76d39afcb72900d1f87996b805cbe71b6d89a1 Mon Sep 17 00:00:00 2001 From: agileguy Date: Sat, 7 Feb 2026 11:45:25 -0700 Subject: [PATCH 2/2] Update README with PyPI installation instructions --- README.md | 40 +++++++--------------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 559c896..557e44c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # LogView [![CI](https://github.com/agileguy/logview/actions/workflows/ci.yml/badge.svg)](https://github.com/agileguy/logview/actions/workflows/ci.yml) +[![PyPI version](https://img.shields.io/pypi/v/logview.svg)](https://pypi.org/project/logview/) +[![Python](https://img.shields.io/pypi/pyversions/logview.svg)](https://pypi.org/project/logview/) A testable, responsive log viewer TUI with pluggable log source contexts. @@ -19,47 +21,19 @@ A testable, responsive log viewer TUI with pluggable log source contexts. ## Installation -> **⚠️ Not Yet Published**: LogView is not yet published to PyPI. The `pip` and `pipx` installation methods below will not work until the first release is published. For now, use the "From Source" method. +[![PyPI version](https://img.shields.io/pypi/v/logview.svg)](https://pypi.org/project/logview/) ### Quick Install (Recommended) -**One-line install** (after PyPI publication): - -```bash -curl -fsSL https://raw.githubusercontent.com/agileguy/logview/main/install.sh | bash -``` - -**Two-step install** (for security-conscious users): - -```bash -# Download and inspect the script first -curl -fsSL https://raw.githubusercontent.com/agileguy/logview/main/install.sh -o install.sh -less install.sh # Review the script -bash install.sh -``` - -This will: -- Check Python 3.11+ is installed -- Install LogView using pipx (isolated environment) or pip -- Create config directory at `~/.config/logview/` -- Verify the installation - -### Alternative Methods - -#### Using pipx (Isolated Environment) - -> **Note**: Requires PyPI publication - ```bash +# Using pipx (isolated environment - recommended) pipx install logview -# With GCP/GKE support -pipx install logview[all] +# Or using pip +pip install logview ``` -#### Using pip - -> **Note**: Requires PyPI publication +### With Optional Dependencies ```bash # Base installation (local logs only)