Skip to content

Commit

Permalink
#5180 do not run publish-to-test-pypi on forks (#5220)
Browse files Browse the repository at this point in the history
* #5180 do not run publish-to-test-pypi on forks

* do not run "publish to pypi" on forks

* Add what's new for #5220

---------

Co-authored-by: lbdreyer <laura.dreyer@metoffice.gov.uk>
  • Loading branch information
agriyakhetarpal and lbdreyer authored Mar 30, 2023
1 parent 2056703 commit 164484e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ jobs:
name: "publish to test.pypi"
runs-on: ubuntu-latest
# upload to Test PyPI for every commit on main branch
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main'
# and check for the SciTools repo
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' && github.repository-owner == 'SciTools'
steps:
- uses: actions/download-artifact@v3
with:
Expand All @@ -152,7 +153,7 @@ jobs:
name: "publish to pypi"
runs-on: ubuntu-latest
# upload to PyPI for every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') && github.repository-owner == 'SciTools'
steps:
- uses: actions/download-artifact@v3
with:
Expand Down
7 changes: 6 additions & 1 deletion docs/src/whatsnew/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ This document explains the changes made to Iris for this release
================

#. Congratulations to `@ESadek-MO`_ who has become a core developer for Iris! 🎉
#. Welcome and congratulations to `@HGWright`_ and `@scottrobinson02`_ who made their first contributions to Iris! 🎉
#. Welcome and congratulations to `@HGWright`_, `@scottrobinson02`_ and
`@agriyakhetarpal`_ who made their first contributions to Iris! 🎉


✨ Features
Expand Down Expand Up @@ -140,6 +141,9 @@ This document explains the changes made to Iris for this release
#. `@lbdreyer`_ removed the Iris TestRunner. Tests are now run via nox or
pytest. (:pull:`5205`)

#. `@agriyakhetarpal`_ prevented the GitHub action for publishing releases to
PyPI from running in forks. (:pull:`5220`)


.. comment
Whatsnew author names (@github name) in alphabetical order. Note that,
Expand All @@ -148,6 +152,7 @@ This document explains the changes made to Iris for this release
.. _@fnattino: https://github.com/fnattino
.. _@ed-hawkins: https://github.com/ed-hawkins
.. _@scottrobinson02: https://github.com/scottrobinson02
.. _@agriyakhetarpal: https://github.com/agriyakhetarpal

.. comment
Whatsnew resources in alphabetical order:
Expand Down

0 comments on commit 164484e

Please sign in to comment.