File tree Expand file tree Collapse file tree 4 files changed +18
-18
lines changed
src/towncrier/newsfragments Expand file tree Collapse file tree 4 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ defaults:
1111 run :
1212 shell : bash
1313
14+ env :
15+ PIP_DISABLE_PIP_VERSION_CHECK : " 1"
16+
1417jobs :
1518 build :
1619 name : ${{ matrix.task.name}} - ${{ matrix.os.name }} ${{ matrix.python.name }}
@@ -250,18 +253,15 @@ jobs:
250253 - name : Set up Python
251254 uses : actions/setup-python@v4
252255 with :
253- python-version : 3.11
254-
255- - name : Install dependencies
256- run : |
257- python -m pip install --upgrade pip
258- python -m pip install pep517
256+ python-version : 3.12
259257
260258 - name : Display structure of files to be pushed
261259 run : ls --recursive dist/
262260
263- - name : Check matched tag version and branch version - on tag
264- run : python admin/check_tag_version_match.py "${{ github.ref }}"
261+ - name : Ensure tag and package versions match.
262+ run : |
263+ python -Im pip install dist/*.whl
264+ python -I admin/check_tag_version_match.py "${{ github.ref }}"
265265
266266 - name : Publish to PyPI - on tag
267267 uses : pypa/gh-action-pypi-publish@a56da0b891b3dc519c7ee3284aff1fad93cc8598
Original file line number Diff line number Diff line change 11#
22# Used during the release process to make sure that we release based on a
3- # tag that has the same version as the current twisted.__version .
3+ # tag that has the same version as the current packaging metadata .
44#
55# Designed to be conditionally called inside GitHub Actions release job.
66# Tags should use PEP440 version scheme.
77#
8- # To be called as: admin/check_tag_version_match.py refs/tags/twisted- 20.3.0
8+ # To be called as: admin/check_tag_version_match.py refs/tags/20.3.0
99#
10+
1011import sys
1112
12- import pep517 . meta
13+ from importlib import metadata
1314
1415
1516TAG_PREFIX = "refs/tags/"
1819 print ("No tag check requested." )
1920 sys .exit (0 )
2021
21- branch_version = pep517 .meta .load ("." ).version
22+ pkg_version = metadata .version ("towncrier" )
23+ print (f"Package version is { pkg_version } ." )
2224run_version = sys .argv [1 ]
2325
2426if not run_version .startswith (TAG_PREFIX ):
2729
2830run_version = run_version [len (TAG_PREFIX ) :] # noqa: E203
2931
30- if run_version != branch_version :
31- print (f"Branch is at '{ branch_version } ' while tag is '{ run_version } '" )
32+ if run_version != pkg_version :
33+ print (f"Package is at '{ pkg_version } ' while tag is '{ run_version } '" )
3234 exit (1 )
3335
34- print (f"All good. Branch and tag versions match for '{ branch_version } '." )
36+ print (f"All good. Package and tag versions match for '{ pkg_version } '." )
3537sys .exit (0 )
Original file line number Diff line number Diff line change 11[build-system ]
2- requires = [
3- " hatchling" ,
4- ]
2+ requires = [" hatchling" ]
53build-backend = " hatchling.build"
64
75
You can’t perform that action at this time.
0 commit comments