From ce0543edc70c9bb8ac0a8e8213e5d3fa1f823a17 Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Wed, 21 Aug 2024 16:07:34 +0100 Subject: [PATCH] Use GitHub Actions for PyPI publish on release --- .github/workflows/release.yaml | 26 ++++++++++++++++++++++++++ docs/release-procedure.md | 8 +------- 2 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..4302b11a --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,26 @@ +name: Publish to PyPI +on: + push: + tags: + - "*.*.*" +jobs: + publish: + runs-on: ubuntu-latest + if: github.repository == 'dask/dask-jobqueue' + environment: + name: pypi + url: https://pypi.org/p/dask-jobqueue + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Python 3.10 + uses: actions/setup-python@v1 + with: + python-version: "3.10" + - name: Build package + run: pip install build && pyproject-build + - name: Publish kr8s + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/docs/release-procedure.md b/docs/release-procedure.md index 308c1815..98f3e2e9 100644 --- a/docs/release-procedure.md +++ b/docs/release-procedure.md @@ -21,13 +21,7 @@ git tag -a x.x.x -m 'Version x.x.x' git push --tags upstream ```` -* Build the wheel/dist and upload to PyPI: - -```` -git clean -xfd -python setup.py sdist bdist_wheel --universal -twine upload dist/* -```` +* A [GitHub Actions workflow](../.github/workflows/release.yaml) will build the wheel/dist and upload to PyPI * The Conda Forge bots should pick up the change automatically within an hour or two. Then follow the instructions from the automatic e-mail that you will