Skip to content

Commit e65600c

Browse files
committed
ci: add test_deploy dry-run for branch validation
1 parent 8d5677b commit e65600c

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
tags:
66
- "v*"
7+
branches:
8+
- "feat/pypi-deploy"
79
workflow_dispatch:
810

911
jobs:
@@ -205,4 +207,20 @@ jobs:
205207
- name: Publish to PyPI
206208
uses: pypa/gh-action-pypi-publish@release/v1
207209
with:
208-
packages-dir: ./dist/
210+
packages-dir: ./dist/
211+
212+
test_deploy:
213+
name: Test Deploy (dry-run)
214+
runs-on: ubuntu-latest
215+
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')
216+
steps:
217+
- uses: actions/checkout@v4
218+
- name: Download wheels from latest GitHub Release
219+
run: |
220+
mkdir -p dist
221+
gh release download --pattern '*.whl' --dir dist
222+
echo "Downloaded wheels:"
223+
ls -la dist/
224+
echo "Dry-run: would publish these to PyPI"
225+
env:
226+
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)