File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88jobs :
99 build-and-upload :
10+ name : Build and upload release to PyPI
1011 runs-on : ubuntu-latest
12+ environment : release
13+ permissions :
14+ id-token : write
1115
1216 steps :
1317 - uses : actions/checkout@v5
1418 with :
1519 fetch-depth : 0
16- - name : Set up Python 3.13
17- uses : actions/setup-python@v6
20+ - uses : astral-sh/setup-uv@v6
1821 with :
19- python-version : ' 3.13'
20- cache : ' pip'
21- cache-dependency-path : ' requirements/publish.txt'
22- - name : Install dependencies
23- run : python -m pip install -r requirements/publish.txt
24- - name : Build sdist and wheel
25- run : python -m build
26- - name : Publish to PyPI
27- env :
28- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
29- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
30- run : |
31- python -m twine check --strict dist/*
32- python -m twine upload dist/*
22+ version : " 0.9.7"
23+ - name : Build package
24+ run : uv build
25+ - name : Publish package
26+ run : uv publish
Original file line number Diff line number Diff line change 11# Python bytecode
2- * .pyc
2+ __pycache__ /
33
44# Coverage database
55.coverage
6-
7- # Build and distribution
8- /dist /
9- /src /* .egg-info /
Original file line number Diff line number Diff line change @@ -12,3 +12,22 @@ From the root directory of the repository:
1212- Run ` uv run coverage run ` to execute the test suite under coverage.
1313- Run ` uvx ruff check ` for linting checks.
1414- Run ` uvx ruff format ` to format the code.
15+
16+ ## Making a release
17+
18+ There's a GitHub Actions workflow that will automatically publish a release to
19+ PyPI when a GitHub release is created.
20+
21+ Steps to make a release:
22+
23+ - Bump the version number in the ` pyproject.toml ` file if necessary, for example using
24+ ` uv version --bump minor ` for a minor release. (Note: this also updates the lockfile.)
25+ Make a PR for the version bump.
26+ - Ensure that the lockfile has been updated. (Not necessary if you used ` uv version ` .)
27+ - Prepare release notes in a (temporary) markdown file.
28+ - Tag the release commit with an annotated tag matching the version (e.g. `git tag -a
29+ 2.3.4`); include the prepared release notes in the commit message body.
30+ - Go to the GitHub releases page: https://github.com/mdickinson/simplefractions/releases
31+ - Create a new release, using the previously prepared release notes.
32+ - Double-check that the release workflow succeeded and that the new release is present
33+ on PyPI at https://pypi.org/project/simplefractions .
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "uv_build"
44
55[project ]
66name = ' simplefractions'
7- version = ' 1.4.0'
7+ version = " 1.4.0"
88description = ' Find the simplest fraction for a given float or interval'
99readme = ' README.md'
1010requires-python = ' >=3.10'
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments