Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GitHub Actions for PyPI publish on release #663

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -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
uses: pypa/gh-action-pypi-publish@release/v1
Comment on lines +25 to +26
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For anyone interested in how this works without passing any credentials I had to log into PyPI and set up GitHub Actions as a trusted publisher.

8 changes: 1 addition & 7 deletions docs/release-procedure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading