diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 94ae99b..586761c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,7 +7,6 @@ concurrency: pypi-publish jobs: publish: runs-on: ubuntu-24.04 - environment: pypi permissions: contents: read id-token: write diff --git a/README.md b/README.md index 93667f4..8eaa5a0 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,13 @@ For HPLuv (the pastel variant), use `hpluv_to_hex`, `hpluv_to_rgb`, `hex_to_hplu Run `python -m unittest discover -v`. +## Publishing to PyPI + +* On PyPI, open the `hsluv` project's **Manage → Publishing** page and configure a GitHub Trusted Publisher: owner **`hsluv`**, repository **`hsluv-python`**, workflow **`publish.yml`**. +* Update `__version__` in `hsluv.py` to an unused version (e.g. `5.0.5rc1` for a pre-release) and push the commit to the branch you want to publish. +* Open **Actions → Publish to PyPI → Run workflow**, select that branch, and run it to build and upload to production PyPI. No tag or GitHub release is needed. +* Verify the release on [PyPI](https://pypi.org/project/hsluv/). Published versions cannot be reused. + ## Authors * Robert McGinley ([mcginleyr1](https://github.com/mcginleyr1)) diff --git a/hsluv.py b/hsluv.py index 9c018af..7c0b5f3 100644 --- a/hsluv.py +++ b/hsluv.py @@ -5,7 +5,7 @@ haxe -cp haxe/src hsluv.Hsluv -python hsluv.py """ -__version__ = '5.0.4' +__version__ = '5.0.5rc1' from functools import wraps as _wraps, partial as _partial # unexport, see #17 import math as _math # unexport, see #17