Skip to content

Commit 7151f83

Browse files
committed
update run command
1 parent b359039 commit 7151f83

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,16 @@ jobs:
2828
named-caches-hash: ${{ hashFiles('requirements.txt') }}
2929

3030
- name: Publish to PyPI
31-
run: "pants publish ::"
31+
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
3241
env:
3342
TWINE_USERNAME: __token__
3443
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)