File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626
2727 - name : Verify version matches tag
2828 run : |
29+ # Check if this is a tag-triggered run
30+ if [[ "$GITHUB_REF" != refs/tags/v* ]]; then
31+ echo "============================================================"
32+ echo "ERROR: This workflow must be triggered from a version tag"
33+ echo "============================================================"
34+ echo ""
35+ echo "Current ref: $GITHUB_REF"
36+ echo ""
37+ echo "How to fix:"
38+ echo " Option 1: Push a tag to trigger automatically"
39+ echo " git tag v0.X.X"
40+ echo " git push origin v0.X.X"
41+ echo ""
42+ echo " Option 2: Use workflow_dispatch from a tag"
43+ echo " 1. Go to Actions → 'Release to PyPI' → 'Run workflow'"
44+ echo " 2. In 'Use workflow from' dropdown, select the TAG (e.g., v0.2.0)"
45+ echo " NOT a branch like 'main'"
46+ echo " 3. Click 'Run workflow'"
47+ echo "============================================================"
48+ exit 1
49+ fi
2950 TAG_VERSION=${GITHUB_REF#refs/tags/v}
3051 PYPROJECT_VERSION=$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
3152
You can’t perform that action at this time.
0 commit comments