Skip to content

Commit 7ba9e61

Browse files
authored
skip workflow on forks (#559)
1 parent 8b82151 commit 7ba9e61

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Diff for: β€Ž.github/workflows/publish_to_pypi.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Python 🐍 distribution πŸ“¦ to PyPI and TestPyPI
1+
name: Publish cloudpickle πŸ₯’ distribution πŸ“¦ to PyPI and TestPyPI
22
# Taken from:
33
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
44

@@ -7,6 +7,8 @@ on: push
77
jobs:
88
build:
99
name: Build distribution πŸ“¦
10+
# Don't run on forked repositories
11+
if: github.event.repository.fork != true
1012
runs-on: ubuntu-latest
1113

1214
steps:
@@ -30,10 +32,11 @@ jobs:
3032
with:
3133
name: python-package-distributions
3234
path: dist/
35+
retention-days: 1
3336

3437
publish-to-pypi:
3538
name: >-
36-
Publish Python 🐍 distribution πŸ“¦ to PyPI
39+
Publish cloudpickle πŸ₯’ distribution πŸ“¦ to PyPI
3740
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
3841
needs:
3942
- build
@@ -55,7 +58,7 @@ jobs:
5558

5659
github-release:
5760
name: >-
58-
Sign the Python 🐍 distribution πŸ“¦ with Sigstore
61+
Sign the cloudpickle πŸ₯’ distribution πŸ“¦ with Sigstore
5962
and upload them to GitHub Release
6063
needs:
6164
- publish-to-pypi
@@ -97,7 +100,7 @@ jobs:
97100
--repo "$GITHUB_REPOSITORY"
98101
99102
publish-to-testpypi:
100-
name: Publish Python 🐍 distribution πŸ“¦ to TestPyPI
103+
name: Publish cloudpickle πŸ₯’ distribution πŸ“¦ to TestPyPI
101104
needs:
102105
- build
103106
runs-on: ubuntu-latest

0 commit comments

Comments
Β (0)