Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 32 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: Publish to PyPI

on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Release tag (e.g. v1.2.3 or reflex-lucide-v0.1.0)"
required: true

jobs:
publish:
Expand All @@ -14,14 +20,38 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Parse release tag
id: parse
run: |
TAG="${{ github.event.release.tag_name || inputs.tag }}"
# Tag format: v1.2.3 for reflex, reflex-lucide-v0.1.0 for sub-packages
if [[ "$TAG" =~ ^v([0-9].*)$ ]]; then
echo "package=reflex" >> "$GITHUB_OUTPUT"
echo "build_dir=." >> "$GITHUB_OUTPUT"
elif [[ "$TAG" =~ ^(.+)-v([0-9].*)$ ]]; then
PACKAGE="${BASH_REMATCH[1]}"
if [ ! -d "packages/$PACKAGE" ]; then
echo "Error: packages/$PACKAGE does not exist"
exit 1
fi
echo "package=$PACKAGE" >> "$GITHUB_OUTPUT"
echo "build_dir=packages/$PACKAGE" >> "$GITHUB_OUTPUT"
else
echo "Error: Tag '$TAG' does not match expected format (v* or <package>-v*)"
exit 1
fi

- name: Build
run: uv build
run: uv build --directory "${{ steps.parse.outputs.build_dir }}"

- name: Verify .pyi files in wheel
if: steps.parse.outputs.package == 'reflex'
run: |
if unzip -l dist/*.whl | grep '\.pyi$'; then
echo "✓ .pyi files found in distribution"
Expand All @@ -31,4 +61,4 @@ jobs:
fi

- name: Publish
run: uv publish
run: uv publish --directory "${{ steps.parse.outputs.build_dir }}"
File renamed without changes.
1 change: 1 addition & 0 deletions docs/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Reflex documentation."""
Loading
Loading