File tree Expand file tree Collapse file tree 2 files changed +25
-17
lines changed
Expand file tree Collapse file tree 2 files changed +25
-17
lines changed Original file line number Diff line number Diff line change 6969 else
7070 echo "No changes to version files"
7171 fi
72- - name : Notify consumer repo of new balatrobot release
73- if : ${{ steps.release.outputs.release_created }}
74- env :
75- BALATROLLM_REPO : " coder/balatrollm"
76- BALATROLLM_TOKEN : ${{ secrets.BALATROLLM_TOKEN }}
77- BALATRO_REPO : " S1M0N38/balatro"
78- BALATRO_TOKEN : ${{ secrets.BALATRO_TOKEN }}
79- run : |
80- VERSION="${{ steps.release.outputs.version }}"
81- curl -X POST -H "Accept: application/vnd.github+json" \
82- -H "Authorization: token $BALATROLLM_TOKEN" \
83- https://api.github.com/repos/$BALATROLLM_REPO/dispatches \
84- -d "{\"event_type\":\"balatrobot_release\",\"client_payload\":{\"version\":\"$VERSION\"}}"
85- curl -X POST -H "Accept: application/vnd.github+json" \
86- -H "Authorization: token $BALATRO_TOKEN" \
87- https://api.github.com/repos/$BALATRO_REPO/dispatches \
88- -d "{\"event_type\":\"balatrobot_release\",\"client_payload\":{\"version\":\"$VERSION\"}}"
Original file line number Diff line number Diff line change 2626 run : uv build
2727 - name : Publish
2828 run : uv publish
29+ - name : Wait for PyPI availability and notify balatrollm
30+ env :
31+ BALATROLLM_TOKEN : ${{ secrets.BALATROLLM_TOKEN }}
32+ run : |
33+ VERSION="${GITHUB_REF_NAME#v}"
34+ echo "Waiting for version $VERSION to appear on PyPI..."
35+
36+ # Poll PyPI until version is available (max 5 minutes)
37+ for i in {1..30}; do
38+ PYPI_VERSION=$(curl -s https://pypi.org/pypi/balatrobot/json | jq -r .info.version)
39+ if [ "$PYPI_VERSION" = "$VERSION" ]; then
40+ echo "✓ Version $VERSION is available on PyPI"
41+ curl -s -X POST -H "Accept: application/vnd.github+json" \
42+ -H "Authorization: token $BALATROLLM_TOKEN" \
43+ https://api.github.com/repos/coder/balatrollm/dispatches \
44+ -d "{\"event_type\":\"balatrobot_release\",\"client_payload\":{\"version\":\"$VERSION\"}}"
45+ echo "✓ Dispatched to balatrollm"
46+ exit 0
47+ fi
48+ echo "Attempt $i/30: PyPI shows $PYPI_VERSION, waiting for $VERSION..."
49+ sleep 10
50+ done
51+
52+ echo "ERROR: Version $VERSION not available on PyPI after 5 minutes"
53+ exit 1
You can’t perform that action at this time.
0 commit comments