Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try out PyPI's trusted publishers #2980

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
on:
label:
types: [created]
A5rocks marked this conversation as resolved.
Show resolved Hide resolved

# a lot of code taken from https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- run: python -m pip install build
- run: python -m build

- uses: actions/upload-artifact@v4
with:
name: trio-sdist
path: dist/*.tar.gz

- uses: actions/upload-artifact@v4
with:
name: trio-wheel
path: dist/*.whl
A5rocks marked this conversation as resolved.
Show resolved Hide resolved

pypi-publish:
needs: [build]
name: upload release to PyPI
runs-on: ubuntu-latest
environment: release
A5rocks marked this conversation as resolved.
Show resolved Hide resolved
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v4
with:
pattern: trio-*
path: dist
merge-multiple: true

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 1 addition & 5 deletions docs/source/releasing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ Things to do for releasing:

* tag with vVERSION, push tag on ``python-trio/trio`` (not on your personal repository)

* push to PyPI::

git clean -xdf # maybe run 'git clean -xdn' first to see what it will delete
python3 -m build
twine upload dist/*
* approve the release workflow
A5rocks marked this conversation as resolved.
Show resolved Hide resolved

* update version number in the same pull request

Expand Down
1 change: 1 addition & 0 deletions newsfragments/2980.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use PyPI's Trusted Publishers to make releases.