chore: only run publish on the master branch#207
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR restricts the publish job in the CircleCI configuration to only execute on the master branch by adding a conditional check. The change ensures that package publishing operations are gated to the master branch, preventing accidental publishes from other branches.
Key Changes:
- Added a
whenconditional block that checks if the current branch is master - Added an informational echo statement to indicate the publishing target
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| steps: | ||
| - run: pip install --user --upgrade setuptools twine wheel | ||
| - run: | | ||
| "$CIRCLE_BRANCH" == "master" && echo "Publishing to PyPI" || echo "Publishing to Cloudsmith" |
There was a problem hiding this comment.
The conditional echo statement on line 30 is unreachable code. Since the entire publish steps block is already wrapped in a condition that only executes when the branch equals 'master' (lines 24-27), this line will always echo 'Publishing to PyPI' and never reach the 'Publishing to Cloudsmith' case. Either remove this line or move it outside the when condition if different behavior is intended for non-master branches.
| "$CIRCLE_BRANCH" == "master" && echo "Publishing to PyPI" || echo "Publishing to Cloudsmith" | |
| echo "Publishing to PyPI" |
|
Closing as this is now part of the new GHA workflow |
No description provided.