-
Notifications
You must be signed in to change notification settings - Fork 51
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
Automate maintenance #155
Automate maintenance #155
Conversation
* Set up manual bump2version * Add *.whl and .vscode/ to .gitignore * Remove deployment step from testing workflow * Deploy on new tag workflow * Bump version on merge * Fix deploy-on-tag pattern matching * Use personal token for version bumps * Only test push events on master Avoids duplicated test runs on pull_request * Explicitly push tags on version bump * Bump version: Fix priority when multiple labels * Setup git name and email from secrets * Use repository dispatch to trigger deployment workflow * Use token with more permissions * Combine deployment workflows * Do not fail fast during testing
Pinging @minrk or @ellisonbg. If you could add me as a maintainer in https://pypi.org/project/pyzmq/ I could do it for ya. My email is granvillelintao at gmail |
@keent I thought there might be zeromq-organisation-level pypi account, but I just realised, they just created a personal PyPI account. You do not need to be a maintainer for https://pypi.org/project/pyzmq/ to generate API tokes for |
@keent is there anything else I can do to ease the setup of the necessary changes? I have an other project that depends on pyre, and I would like to publish it on PyPI. Unfortunately, I cannot do so, until pyre is available there, too. Direct dependencies are not allowed on PyPI. |
@papr ok you want me to upload pyre to pypi. what else do I need to do to help out? |
Hi, these are the steps for the setup:
|
pinging @sphaero. do you have access on the settings page? It seems like I don't. We want to add the pypi token. It would be great for PyPI automation |
how about now? |
@sphaero Thanks. Now I can see the settings page. But not the more specific 'secrets' tab on it. |
One needs admin rights to access the secrets settings. @sphaero Feel free to perform the setup steps (#155 (comment)) by yourself if you are not comfortable with giving admin privileges to someone else. |
Never set up pypi before, but if you need me to paste tokens somewhere, you can email it to me gpg encrypted, my public key is on https://keys.openpgp.org/ and also pasted here https://github.com/zeromq/libzmq/security/policy |
@bluca sent you the token vie encrypted email. my gmail is also on this page and also available at https://keys.openpgp.org/. |
@keent done! |
It failed at https://github.com/zeromq/pyre/runs/2823212481?check_suite_focus=true Bump Version
Let me know |
Looks like the @keent you should be able to re-trigger the workflow manually from https://github.com/zeromq/pyre/actions/workflows/deploy.yml Since it is a manual within-repo action, the token should get write access. I will look for a long-term solution to avoid the need of manual deployments. Edit: Long-term solution requires setting up a personal access token and saving it as an additional repository secret. Source |
@papr it still fails with the same error. do we need to configure anything here: https://docs.github.com/en/github/administering-a-repository/managing-repository-settings/disabling-or-limiting-github-actions-for-a-repository |
Possible. I thought write-permissions were the default. At least, they were in my repo when I tested the workflow. :-/ It indeed looks like the token could have read-access only. Do you have enough access to change these settings? |
I don't have access. @bluca Can you please help changing the github token access to both write and read. Example: https://docs.github.com/en/github/administering-a-repository/managing-repository-settings/disabling-or-limiting-github-actions-for-a-repository We need it for the deployment. Thanks |
done |
@papr it works now. https://pypi.org/project/zeromq-pyre/. well done. thanks |
I could still help with manual deployment. Just let me know |
TLDR: Automates maintenance/deployment by automatically bumping project versions on PR merges and publishing the version-bumped source distribution to PyPI. Requires a one-time setup before merging.
This is a bigger one. Details can be found in the new
MAINTENANCE.md
file.This PR splits the previous testing+deployment Github Action into:
Things to setup once before merging:
PYPI_TOKEN
repository secret (maybe @minrk or @ellisonbg could help out with this one, as they are listed as maintainers on https://pypi.org/project/pyzmq/)bump:*
labels bump thepatch
part by defaultbump:none
bump:major
bump:minor
bump:patch
I tested this PR thoroughly on my own repository.