We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b359039 commit 7151f83Copy full SHA for 7151f83
.github/workflows/release.yml
@@ -28,7 +28,16 @@ jobs:
28
named-caches-hash: ${{ hashFiles('requirements.txt') }}
29
30
- name: Publish to PyPI
31
- run: "pants publish ::"
+ run: |
32
+ # Get list of changed targets that are publishable
33
+ changed_targets=$(pants --changed-since=origin/main filter :: | grep -v "^$")
34
+
35
+ if [ -n "$changed_targets" ]; then
36
+ echo "Publishing changed targets: $changed_targets"
37
+ pants publish $changed_targets
38
+ else
39
+ echo "No changes detected, skipping publish"
40
+ fi
41
env:
42
TWINE_USERNAME: __token__
43
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
0 commit comments