@@ -227,71 +227,76 @@ jobs:
227227 retention-days : 5
228228
229229 # ===========================================================================
230- # Publish to PyPI (DISABLED FOR TESTING)
230+ # Publish to PyPI
231231 # ===========================================================================
232- # publish:
233- # name: Publish to PyPI
234- # runs-on: ubuntu-latest
235- # needs: [build-wheel, build-sdist]
236- # # Required for PyPI Trusted Publisher (OIDC) - no token needed!
237- # permissions:
238- # id-token: write
239- # contents: read
240- # steps:
241- # - name: Set up Python
242- # uses: actions/setup-python@v5
243- # with:
244- # python-version: '3.12'
232+ publish :
233+ name : Publish to PyPI
234+ runs-on : ubuntu-latest
235+ needs : [build-wheel, build-sdist]
236+ # Required for PyPI Trusted Publisher (OIDC) - no token needed!
237+ permissions :
238+ id-token : write
239+ contents : read
240+ steps :
241+ - name : Set up Python
242+ uses : actions/setup-python@v5
243+ with :
244+ python-version : ' 3.12'
245245
246- # - name: Download all artifacts
247- # uses: actions/download-artifact@v4
248- # with:
249- # path: dist/
250- # merge-multiple: true
246+ - name : Download all artifacts
247+ uses : actions/download-artifact@v4
248+ with :
249+ path : dist/
250+ merge-multiple : true
251251
252- # - name: List packages
253- # run: |
254- # echo "=== Packages to upload ==="
255- # ls -la dist/
256- # if [ -z "$(ls -A dist/)" ]; then
257- # echo "ERROR: No Python packages found!"
258- # exit 1
259- # fi
252+ - name : List packages
253+ run : |
254+ echo "=== Packages to upload ==="
255+ ls -la dist/
256+ if [ -z "$(ls -A dist/)" ]; then
257+ echo "ERROR: No Python packages found!"
258+ exit 1
259+ fi
260260
261- # - name: Validate packages
262- # run: |
263- # pip install twine
264- # twine check dist/*
261+ - name : Validate packages
262+ run : |
263+ pip install twine
264+ twine check dist/*
265265
266- # - name: Publish to PyPI (Trusted Publisher)
267- # if: ${{ inputs.dry_run != true }}
268- # uses: pypa/gh-action-pypi-publish@release/v1
269- # with:
270- # packages-dir: dist/
271- # skip-existing: true
272- # verbose: true
266+ - name : Publish to PyPI (Trusted Publisher)
267+ if : ${{ inputs.dry_run != true }}
268+ uses : pypa/gh-action-pypi-publish@release/v1
269+ with :
270+ packages-dir : dist/
271+ skip-existing : true
272+ verbose : true
273273
274- # - name: Dry run validation
275- # if: ${{ inputs.dry_run == true }}
276- # run: |
277- # echo "🔍 Dry run - packages validated but not uploaded"
278- # echo "Packages:"
279- # ls -la dist/
274+ - name : Dry run validation
275+ if : ${{ inputs.dry_run == true }}
276+ run : |
277+ echo "🔍 Dry run - packages validated but not uploaded"
278+ echo "Packages:"
279+ ls -la dist/
280280
281281 # ===========================================================================
282282 # Release Summary
283283 # ===========================================================================
284284 summary :
285285 name : Release Summary
286286 runs-on : ubuntu-latest
287- needs : [build-wheel, build-sdist ]
287+ needs : [publish ]
288288 if : always()
289289 steps :
290290 - name : Summary
291291 run : |
292292 echo "## 🐍 ToonDB Python SDK v${{ inputs.version }}" >> $GITHUB_STEP_SUMMARY
293293 echo "" >> $GITHUB_STEP_SUMMARY
294- echo "**Mode:** TEST BUILD (Publishing Disabled)" >> $GITHUB_STEP_SUMMARY
294+
295+ if [ "${{ inputs.dry_run }}" = "true" ]; then
296+ echo "**Mode:** Dry Run (no packages published)" >> $GITHUB_STEP_SUMMARY
297+ else
298+ echo "**Mode:** Production Release" >> $GITHUB_STEP_SUMMARY
299+ fi
295300
296301 echo "" >> $GITHUB_STEP_SUMMARY
297302 echo "### Installation" >> $GITHUB_STEP_SUMMARY
@@ -311,3 +316,4 @@ jobs:
311316 echo "|-----|--------|" >> $GITHUB_STEP_SUMMARY
312317 echo "| Build Wheels | ${{ needs.build-wheel.result || 'N/A' }} |" >> $GITHUB_STEP_SUMMARY
313318 echo "| Build sdist | ${{ needs.build-sdist.result || 'N/A' }} |" >> $GITHUB_STEP_SUMMARY
319+ echo "| Publish | ${{ needs.publish.result }} |" >> $GITHUB_STEP_SUMMARY
0 commit comments