1515 - patch
1616 - minor
1717 - major
18- dry_run :
19- description : ' Dry run (skip PyPI upload and tag creation)'
20- required : false
21- type : boolean
22- default : false
2318
2419jobs :
2520 release :
@@ -89,17 +84,10 @@ jobs:
8984 echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
9085
9186 - name : Create and push tag
92- if : ${{ !inputs.dry_run }}
9387 run : |
9488 git tag ${{ steps.next_version.outputs.version }}
9589 git push origin ${{ steps.next_version.outputs.version }}
9690
97- - name : Dry run - Show tag (not created)
98- if : ${{ inputs.dry_run }}
99- run : |
100- echo "DRY RUN: Would create tag ${{ steps.next_version.outputs.version }}"
101- echo "DRY RUN: Tag not actually created"
102-
10391 - name : Install build dependencies
10492 run : |
10593 python -m pip install --upgrade pip
@@ -109,27 +97,12 @@ jobs:
10997 run : |
11098 python -m build
11199
112- - name : Validate package (dry run check)
113- run : |
114- python -m pip install twine
115- python -m twine check dist/*
116-
117100 - name : Upload to PyPI using Trusted Publisher
118- if : ${{ !inputs.dry_run }}
119101 uses : pypa/gh-action-pypi-publish@release/v1
120102 with :
121103 packages-dir : dist/
122104
123- - name : Dry run - Show what would be uploaded
124- if : ${{ inputs.dry_run }}
125- run : |
126- echo "DRY RUN: Would upload the following files to PyPI:"
127- ls -lh dist/
128- echo ""
129- echo "DRY RUN: Package validation passed, but not uploading to PyPI"
130-
131105 - name : Create GitHub Release
132- if : ${{ !inputs.dry_run }}
133106 env :
134107 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
135108 run : |
@@ -138,32 +111,15 @@ jobs:
138111 --generate-notes \
139112 dist/*
140113
141- - name : Dry run - Show release info
142- if : ${{ inputs.dry_run }}
143- run : |
144- echo "DRY RUN: Would create GitHub release ${{ steps.next_version.outputs.version }}"
145- echo "DRY RUN: Release not actually created"
146-
147114 - name : Print summary
148115 if : success()
149116 run : |
150- if [ "${{ inputs.dry_run }}" == "true" ]; then
151- echo "### 🧪 Dry Run Completed Successfully!" >> $GITHUB_STEP_SUMMARY
152- echo "" >> $GITHUB_STEP_SUMMARY
153- echo "- **Release Type:** ${{ github.event.inputs.release_type }}" >> $GITHUB_STEP_SUMMARY
154- echo "- **Would Create Version:** ${{ steps.next_version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
155- echo "- **Package Built:** ✅ (validated with twine check)" >> $GITHUB_STEP_SUMMARY
156- echo "- **PyPI Upload:** ⏭️ Skipped (dry run)" >> $GITHUB_STEP_SUMMARY
157- echo "- **GitHub Release:** ⏭️ Skipped (dry run)" >> $GITHUB_STEP_SUMMARY
158- echo "- **Git Tag:** ⏭️ Not created (dry run)" >> $GITHUB_STEP_SUMMARY
159- else
160- echo "### :rocket: Release ${{ steps.next_version.outputs.version }} completed successfully!" >> $GITHUB_STEP_SUMMARY
161- echo "" >> $GITHUB_STEP_SUMMARY
162- echo "- **Release Type:** ${{ github.event.inputs.release_type }}" >> $GITHUB_STEP_SUMMARY
163- echo "- **New Version:** ${{ steps.next_version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
164- echo "- **PyPI Package:** Published via Trusted Publisher" >> $GITHUB_STEP_SUMMARY
165- echo "- **GitHub Release:** Created with auto-generated notes" >> $GITHUB_STEP_SUMMARY
166- fi
117+ echo "### :rocket: Release ${{ steps.next_version.outputs.version }} completed successfully!" >> $GITHUB_STEP_SUMMARY
118+ echo "" >> $GITHUB_STEP_SUMMARY
119+ echo "- **Release Type:** ${{ github.event.inputs.release_type }}" >> $GITHUB_STEP_SUMMARY
120+ echo "- **New Version:** ${{ steps.next_version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
121+ echo "- **PyPI Package:** Published via Trusted Publisher" >> $GITHUB_STEP_SUMMARY
122+ echo "- **GitHub Release:** Created with auto-generated notes" >> $GITHUB_STEP_SUMMARY
167123
168124 - name : Print failure message
169125 if : failure()
0 commit comments