Skip to content

Commit 16011fe

Browse files
authored
Merge pull request #374 from zopefoundation/dataflake/trusted_publishing
Use PyPI "Trusted Publishing"
2 parents f65223e + aaaa559 commit 16011fe

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

CHANGES.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Change log
44
2.2 (unreleased)
55
----------------
66

7+
- Change ``c-code`` GitHub Actions publishing step to use
8+
PyPI's "Trusted Publishing".
9+
(`#198 <https://github.com/zopefoundation/meta/issues/198>`_)
10+
711
- Move package metadata from setup.py to pyproject.toml.
812

913
- When moving metadata to ``pyproject.toml``, ignore ``setup py test`` fossils.

src/zope/meta/c-code/tests.yml.j2

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ env:
5858

5959
CFLAGS: -O3 -pipe
6060
CXXFLAGS: -O3 -pipe
61-
# Uploading built wheels for releases.
62-
# TWINE_PASSWORD is encrypted and stored directly in the
63-
# github repo settings.
64-
TWINE_USERNAME: __token__
6561

6662
###
6763
# caching
@@ -398,8 +394,12 @@ jobs:
398394
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
399395
# Wait for both build jobs to complete
400396
needs: [build-package, manylinux]
397+
environment:
398+
name: pypi
399+
url: https://pypi.org/p/%(package_name)s
401400
permissions:
402401
contents: read
402+
id-token: write # Mandatory for trusted publishing
403403

404404
steps:
405405
- name: Download all wheel artifacts
@@ -429,8 +429,6 @@ jobs:
429429
- name: Publish to PyPI
430430
uses: pypa/gh-action-pypi-publish@release/v1
431431
with:
432-
user: __token__
433-
password: ${{ secrets.TWINE_PASSWORD }}
434432
skip-existing: true
435433
packages-dir: dist/
436434
verbose: true

0 commit comments

Comments
 (0)