@@ -32,50 +32,24 @@ jobs:
3232
3333 - name : Parse release tag
3434 id : parse
35- run : |
36- TAG="${{ github.event.release.tag_name || inputs.tag }}"
37- # Tag format: v1.2.3 for reflex, reflex-lucide-v0.1.0 for sub-packages
38- if [[ "$TAG" =~ ^v([0-9].*)$ ]]; then
39- echo "package=reflex" >> "$GITHUB_OUTPUT"
40- echo "build_dir=." >> "$GITHUB_OUTPUT"
41- echo "version=${BASH_REMATCH[1]}" >> "$GITHUB_OUTPUT"
42- elif [[ "$TAG" =~ ^(.+)-v([0-9].*)$ ]]; then
43- PACKAGE="${BASH_REMATCH[1]}"
44- if [ ! -d "packages/$PACKAGE" ]; then
45- echo "Error: packages/$PACKAGE does not exist"
46- exit 1
47- fi
48- echo "package=$PACKAGE" >> "$GITHUB_OUTPUT"
49- echo "build_dir=packages/$PACKAGE" >> "$GITHUB_OUTPUT"
50- echo "version=${BASH_REMATCH[2]}" >> "$GITHUB_OUTPUT"
51- else
52- echo "Error: Tag '$TAG' does not match expected format (v* or <package>-v*)"
53- exit 1
54- fi
35+ env :
36+ TAG : ${{ github.event.release.tag_name || inputs.tag }}
37+ run : bash .github/scripts/publish/parse_tag.sh
5538
5639 - name : Pin reflex-base to exact version
5740 if : steps.parse.outputs.package == 'reflex'
58- run : |
59- VERSION="${{ steps.parse.outputs.version }}"
60- if ! grep -q '"reflex-base >= ' pyproject.toml; then
61- echo "Error: expected 'reflex-base >= ...' dependency in pyproject.toml"
62- exit 1
63- fi
64- sed -i 's|"reflex-base >= [^"]*"|"reflex-base == '"$VERSION"'"|' pyproject.toml
65- grep '"reflex-base' pyproject.toml
41+ env :
42+ VERSION : ${{ steps.parse.outputs.version }}
43+ run : bash .github/scripts/publish/pin_reflex_base.sh
6644
6745 - name : Build
6846 run : uv build --directory "${{ steps.parse.outputs.build_dir }}"
6947
7048 - name : Verify .pyi files in wheel
7149 if : steps.parse.outputs.package == 'reflex'
72- run : |
73- if unzip -l ${{ steps.parse.outputs.build_dir }}/dist/*.whl | grep '\.pyi$'; then
74- echo "✓ .pyi files found in distribution"
75- else
76- echo "Error: No .pyi files found in wheel"
77- exit 1
78- fi
50+ env :
51+ BUILD_DIR : ${{ steps.parse.outputs.build_dir }}
52+ run : bash .github/scripts/publish/verify_pyi.sh
7953
8054 - name : Publish
8155 run : uv publish dist/*
0 commit comments