Skip to content

Commit bdb9727

Browse files
authored
Merge pull request #30 from twisted/release-25.2
Release 25.2
2 parents 9daf5f4 + 08038c9 commit bdb9727

File tree

5 files changed

+72
-14
lines changed

5 files changed

+72
-14
lines changed

.github/workflows/github-deploy.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@ name: Build and upload to PyPI
22
on:
33
push:
44
branches:
5-
- default
6-
tags:
7-
- v*
5+
- trunk
6+
# To simplify the release process, the publishing is triggered on tag.
7+
# We should make sure to only push tags for new releases.
8+
# If we start using tags for non-release purposes,
9+
# this needs to be updated.
10+
#
11+
# We need to explicitly configure an expression that matches anything.
12+
tags: [ "**" ]
813
pull_request:
914

1015
jobs:
@@ -75,12 +80,11 @@ jobs:
7580
path: dist/*.tar.gz
7681

7782
upload_pypi:
78-
needs: [build_wheels, build_sdist]
83+
needs: [build_wheels, build_sdist, check_manifest]
7984
runs-on: ubuntu-latest
80-
# upload to PyPI on every tag starting with 'v'
81-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
82-
# alternatively, to publish when a GitHub Release is created, use the following rule:
83-
# if: github.event_name == 'release' && github.event.action == 'published'
85+
permissions:
86+
# IMPORTANT: this permission is mandatory for trusted publishing
87+
id-token: write
8488
steps:
8589
- uses: actions/download-artifact@v4
8690
with:
@@ -91,8 +95,7 @@ jobs:
9195
- name: Check files
9296
run: ls -al dist/
9397

94-
- uses: pypa/gh-action-pypi-publish@master
95-
with:
96-
user: __token__
97-
password: ${{ secrets.pypi_password }}
98-
# To test: repository_url: https://test.pypi.org/legacy/
98+
- name: Publish to PyPI - on tag
99+
# Skip upload to PyPI if we don't have a tag
100+
if: startsWith(github.ref, 'refs/tags/')
101+
uses: pypa/gh-action-pypi-publish@release/v1

CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Changelog
22
=========
33

4+
5+
25.2.0 (2025-02-27)
6+
-------------------
7+
8+
- Add support for Python 3.13 wheels.
9+
- Add support for Python 3.13 free threading wheels.
10+
11+
412
1.0.4 (2023-08-10)
513
------------------
614

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ include LICENSE
99
exclude CHANGELOG.rst
1010
exclude CONTRIBUTING.rst
1111
exclude SECURITY.md
12+
exclude RELEASE.rst
1213
exclude .pre-commit-config.yaml

RELEASE.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
How to do a release
2+
###################
3+
4+
We use calendar versioning, similar to the `twisted/twisted` project.
5+
6+
To do a release, follow these steps:
7+
8+
* Create a new branch. You can name the branch `release-YEAR.MONTH`.
9+
* Update the `[metadata] version` inside `setup.cfg`
10+
* Update the `Changelog.rst` file with the summary of the changes.
11+
* Commit the changes to GitHub and create a PR
12+
* Request the review from `twisted-contributors` team.
13+
* Once the PR is approved, create a new release via `GitHub Releases<https://github.com/twisted/twisted-iocpsupport/releases/new>`_.
14+
The tag name should be the current version. Select to create a new tag.
15+
Select the release branch as the target branch.
16+
Copy/paste the release notes.
17+
* Publish the release.
18+
This will automatically trigger that creation of a new that,
19+
which in turn will trigger the build process for the wheels and will
20+
publish them to PyPI.
21+
22+
Using GitHub Releases is not required.
23+
You can also just create and push a new tag.
24+
It will still trigger the publish process.
25+
26+
GitHub Release should just make it a bit easier to detect the release of this project.
27+
28+
29+
Implementation details
30+
======================
31+
32+
To publish to PyPi, the GitHub Action workflow needs to be named `github-deploy.yml`.
33+
You can `reconfigure this via PyPi <https://pypi.org/manage/project/twisted-iocpsupport/settings/publishing/>`_.
34+
35+
The binary wheels are generated using `cibuildwheel`.
36+
To build wheels for newer Python version you might need to update the version
37+
of `cibuildwheel`.
38+
39+
To disable building binaries for older Python version you might need to
40+
edit the `[tool.cibuildwheel]` section from the `pyproject.toml` file.
41+
42+
GitHub Action is used to run `cibuildwheel` to generate the wheels on any
43+
commit pushed to the main branch, to a PR or a tag.
44+
45+
Any tag pushed that has a name starting with `v` will trigger the publishing
46+
to the production PyPI site.

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = twisted-iocpsupport
3-
version = 1.0.4
3+
version = 25.2.0
44
description = An extension for use in the twisted I/O Completion Ports reactor.
55
long_description = file: README.rst
66
long_description_content_type = text/x-rst

0 commit comments

Comments
 (0)