Skip to content

Commit 47df269

Browse files
sidmohan0claude
andcommitted
feat(release): add dry run mode to weekly release workflow
- Add optional dry_run parameter for manual workflow triggers - Skip PyPI publishing, GitHub releases, and git pushes in dry run mode - Include comprehensive dry run summary for testing - Allows safe testing of release pipeline without actual publishing - Maintains automatic Friday releases while enabling safe validation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent a30dd74 commit 47df269

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/weekly-release.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ on:
1515
- patch
1616
- minor
1717
- major
18+
dry_run:
19+
description: "Dry run (test without publishing)"
20+
required: false
21+
default: false
22+
type: boolean
1823

1924
jobs:
2025
release:
@@ -84,12 +89,14 @@ jobs:
8489
echo "✅ Wheel size OK: ${WHEEL_SIZE}MB"
8590
8691
- name: Publish to PyPI
92+
if: ${{ !inputs.dry_run }}
8793
env:
8894
TWINE_USERNAME: __token__
8995
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
9096
run: twine upload dist/*
9197

9298
- name: Create GitHub Release
99+
if: ${{ !inputs.dry_run }}
93100
env:
94101
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95102
run: |
@@ -99,14 +106,28 @@ jobs:
99106
dist/*
100107
101108
- name: Push changes
109+
if: ${{ !inputs.dry_run }}
102110
run: |
103111
git push origin dev --tags
104112
105113
- name: Notify Discord
106-
if: env.DISCORD_WEBHOOK
114+
if: ${{ !inputs.dry_run && env.DISCORD_WEBHOOK }}
107115
env:
108116
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
109117
run: |
110118
curl -X POST "$DISCORD_WEBHOOK" \
111119
-H "Content-Type: application/json" \
112120
-d "{\"content\": \"🚀 DataFog v${{ env.NEW_VERSION }} is live! Install with: \`pip install datafog==${{ env.NEW_VERSION }}\`\"}"
121+
122+
- name: Dry Run Summary
123+
if: ${{ inputs.dry_run }}
124+
run: |
125+
echo "🧪 DRY RUN COMPLETED"
126+
echo "✅ Tests passed"
127+
echo "✅ Changelog generated"
128+
echo "✅ Version would be bumped to: ${{ env.NEW_VERSION }}"
129+
echo "✅ Wheel built and validated"
130+
echo "❌ Skipped: PyPI publishing"
131+
echo "❌ Skipped: GitHub release creation"
132+
echo "❌ Skipped: Git tag pushing"
133+
echo "❌ Skipped: Discord notification"

0 commit comments

Comments
 (0)