File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -167,10 +167,9 @@ jobs:
167167# with:
168168# recipe-path: conda-recipe/recipe.yaml
169169
170- publish-pypi :
171- name : Publish to PyPI
170+ pip-build :
171+ name : Build and publish to PyPI
172172 needs : test
173- if : github.ref == 'refs/heads/main'
174173 runs-on : ubuntu-latest
175174 steps :
176175 - name : Check out the repository
@@ -204,7 +203,7 @@ jobs:
204203
205204 - name : Push tag
206205 id : tag-version
207- if : steps.check-version.outputs.previous-version != steps.check-version.outputs.current-version
206+ if : github.ref == 'refs/heads/main' && steps.check-version.outputs.previous-version != steps.check-version.outputs.current-version
208207 uses :
mathieudutour/[email protected] 209208 with :
210209 github_token : ${{ secrets.GITHUB_TOKEN }}
@@ -215,14 +214,15 @@ jobs:
215214 python -m build
216215
217216 - name : Publish package on PyPI
218- if : steps.tag-version.outputs.new_tag
217+ if : github.ref == 'refs/heads/main' && steps.tag-version.outputs.new_tag
219218 uses : pypa/gh-action-pypi-publish@release/v1.12
220219 with :
221220 user : __token__
222221 password : " ${{ secrets.PYPI_TOKEN }}"
223222 packages-dir : dist/
224223
225224 - name : Publish the release notes
225+ if : github.ref == 'refs/heads/main'
226226 uses :
release-drafter/[email protected] 227227 with :
228228 publish : " ${{ steps.tag-version.outputs.new_tag != '' }}"
You can’t perform that action at this time.
0 commit comments