Skip to content

Commit 164484e

Browse files
#5180 do not run publish-to-test-pypi on forks (#5220)
* #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>
1 parent 2056703 commit 164484e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/ci-wheels.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ jobs:
132132
name: "publish to test.pypi"
133133
runs-on: ubuntu-latest
134134
# upload to Test PyPI for every commit on main branch
135-
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main'
135+
# and check for the SciTools repo
136+
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' && github.repository-owner == 'SciTools'
136137
steps:
137138
- uses: actions/download-artifact@v3
138139
with:
@@ -152,7 +153,7 @@ jobs:
152153
name: "publish to pypi"
153154
runs-on: ubuntu-latest
154155
# upload to PyPI for every tag starting with 'v'
155-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
156+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') && github.repository-owner == 'SciTools'
156157
steps:
157158
- uses: actions/download-artifact@v3
158159
with:

docs/src/whatsnew/latest.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ This document explains the changes made to Iris for this release
2626
================
2727

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

3132

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

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

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

152157
.. comment
153158
Whatsnew resources in alphabetical order:

0 commit comments

Comments
 (0)