Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ jobs:
- name: Validate tag matches version
run: |
TAG="${GITHUB_REF#refs/tags/v}"
VERSION=$(python - << 'EOF'
from screenshot-to-text.__version__ import __version__
VERSION=$(uv run python - << 'EOF'
import sys
# Add current directory to path if not installed
sys.path.append(".")
from screenshot_to_text.__version__ import __version__
print(__version__)
EOF
)
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/publish_testpypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ jobs:
- name: Get base version
id: version
run: |
VERSION=$(python - << 'EOF'
from screenshot-to-text.__version__ import __version__
# Use uv run to ensure the local package is accessible
VERSION=$(uv run python - << 'EOF'
import sys
# Add current directory to path if not installed
sys.path.append(".")
from screenshot_to_text.__version__ import __version__
print(__version__)
EOF
)
Expand All @@ -32,7 +36,7 @@ jobs:
run: |
DEV_VERSION="${{ steps.version.outputs.version }}.dev${{ github.run_number }}"
echo "DEV_VERSION=$DEV_VERSION" >> $GITHUB_ENV
sed -i "s/__version__ = \".*\"/__version__ = \"$DEV_VERSION\"/" screenshot-to-text/__version__.py
sed -i "s|__version__ = \".*\"|__version__ = \"$DEV_VERSION\"|" src/screenshot_to_text/__version__.py

- name: Build
run: uv build
Expand Down