Skip to content

Commit bc0e115

Browse files
committed
Enable trusted publishing.
1 parent 79bc6e0 commit bc0e115

3 files changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,35 @@ jobs:
9393
name: zope.testing.tar.gz
9494
path: dist/*gz
9595

96+
publish:
97+
name: Publish to PyPI
98+
runs-on: ubuntu-latest
99+
# Only publish on tag pushes
100+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
101+
# Wait for build jobs to complete
102+
needs: [build]
103+
environment:
104+
name: pypi
105+
url: https://pypi.org/p/zope.testing
106+
permissions:
107+
contents: read
108+
id-token: write # Mandatory for trusted publishing
109+
110+
steps:
111+
- name: Download package artifacts
112+
uses: actions/download-artifact@v8
113+
with:
114+
path: dist/
115+
pattern: '*'
116+
merge-multiple: true
117+
118+
- name: Display structure of downloaded files
119+
run: |
120+
ls -lR dist/
121+
122+
- name: Publish to PyPI
123+
uses: pypa/gh-action-pypi-publish@release/v1
124+
with:
125+
skip-existing: true
126+
packages-dir: dist/
127+
verbose: true

.meta.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ additional-config = [
3939
additional-ignores = [
4040
"docs/_build/html/_sources/api/*",
4141
]
42+
43+
[pypi]
44+
trusted-publishing = true

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,8 @@ directory = "parts/htmlcov"
9191
[tool.setuptools.dynamic]
9292
readme = {file = ["README.rst", "CHANGES.rst"]}
9393

94+
95+
96+
[tool.zest-releaser]
97+
create-wheel = false
98+
upload-pypi = false

0 commit comments

Comments
 (0)