diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7bce3e4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Build Wheel and Release +on: + push: + tags: + - v* + +jobs: + pypi-publish: + name: upload release to PyPI + runs-on: ubuntu-latest + # Specifying a GitHub environment is optional, but strongly encouraged + environment: release + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: actions/setup-python@v4 + name: Install Python + with: + python-version: "3.11" + + - name: Build wheels + run: | + git clean -fxd + pip install -U build twine wheel + python -m build --sdist --wheel + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/RELEASE.md b/RELEASE.md index aca47a7..cd1585c 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -46,17 +46,6 @@ Example `version number` where `origin` is the name of the `github.com:scientific-python/lazy_loader` repository -- Review the github release page: - - https://github.com/scientific-python/lazy_loader/tags - -- Publish on PyPi: - - git clean -fxd - pip install -U build twine wheel - python -m build --sdist --wheel - twine upload -s dist/* - - Update `version` in `pyproject.toml`. - Commit changes: