@@ -113,72 +113,10 @@ jobs:
113113 ${VERSION}
114114 fi
115115
116- - name : Generate versions metadata
117- if : ${{ github.event.inputs.dry-run == 'false' }}
118- env :
119- GITHUB_EVENT_INPUTS_TAG : ${{ github.event.inputs.tag }}
120- GITHUB_REPOSITORY : ${{ github.repository }}
121- run : uv run generate-version-metadata.py > dist/versions.ndjson
122-
123- - name : Validate metadata
124- if : ${{ github.event.inputs.dry-run == 'false' }}
125- run : |
126- echo "Generated $(wc -l < dist/versions.ndjson) version entries"
127- head -c 1000 dist/versions.ndjson
128-
129- - name : Set branch name
130- if : ${{ github.event.inputs.dry-run == 'false' }}
131- env :
132- TAG : ${{ github.event.inputs.tag }}
133- run : echo "BRANCH_NAME=update-versions-$TAG-$(date +%s)" >> $GITHUB_ENV
134-
135- - name : Clone versions repo
136- if : ${{ github.event.inputs.dry-run == 'false' }}
137- run : git clone https://${{ secrets.ASTRAL_VERSIONS_PAT }}@github.com/astral-sh/versions.git astral-versions
138-
139- - name : Update versions
140- if : ${{ github.event.inputs.dry-run == 'false' }}
141- run : cat dist/versions.ndjson | uv run astral-versions/scripts/insert-versions.py --name python-build-standalone
142-
143- - name : Commit versions
144- if : ${{ github.event.inputs.dry-run == 'false' }}
145- env :
146- TAG : ${{ github.event.inputs.tag }}
147- working-directory : astral-versions
148- run : |
149- git config user.name "astral-versions-bot"
150- git config user.email "176161322+astral-versions-bot@users.noreply.github.com"
151-
152- git checkout -b "$BRANCH_NAME"
153- git add -A
154- git commit -m "Update python-build-standalone to $TAG"
155-
156- - name : Create Pull Request
157- if : ${{ github.event.inputs.dry-run == 'false' }}
158- env :
159- TAG : ${{ github.event.inputs.tag }}
160- GH_TOKEN : ${{ secrets.ASTRAL_VERSIONS_PAT }}
161- working-directory : astral-versions
162- run : |
163- pull_request_title="Update python-build-standalone versions for $TAG"
164-
165- gh pr list --state open --json title --jq ".[] | select(.title == \"$pull_request_title\") | .number" | \
166- xargs -I {} gh pr close {}
167-
168- git push origin "$BRANCH_NAME"
169-
170- gh pr create --base main --head "$BRANCH_NAME" \
171- --title "$pull_request_title" \
172- --body "Automated versions update for $TAG" \
173- --label "automation"
174-
175- - name : Merge Pull Request
176- if : ${{ github.event.inputs.dry-run == 'false' }}
177- env :
178- GH_TOKEN : ${{ secrets.ASTRAL_VERSIONS_PAT }}
179- working-directory : astral-versions
180- run : |
181- # Wait for PR to be created before merging
182- sleep 10
183- gh pr merge --squash "$BRANCH_NAME"
184-
116+ publish-versions :
117+ needs : release
118+ if : ${{ github.event.inputs.dry-run == 'false' }}
119+ uses : ./.github/workflows/publish-versions.yml
120+ with :
121+ tag : ${{ github.event.inputs.tag }}
122+ secrets : inherit
0 commit comments