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

Release process: document, automate #428

Closed
blueyed opened this issue Jan 20, 2020 · 8 comments · Fixed by #429
Closed

Release process: document, automate #428

blueyed opened this issue Jan 20, 2020 · 8 comments · Fixed by #429

Comments

@blueyed
Copy link
Contributor

blueyed commented Jan 20, 2020

For easier releases it would be nice if tags get deployed via Travis.

See https://github.com/Vimjas/vint/blob/db881f8fe7127cd092436371643e48903099f114/.travis.yml#L38-L53 for reference - it uses a token generated via PyPI's admin interface.

@blueyed blueyed changed the title Deployment via Travis Release deployment via Travis Jan 20, 2020
@justinmk
Copy link
Member

IIUC you're suggesting that when a human creates a tag, that should trigger CI to publish to pypi.

That could be nice, although it depends on how cumbersome the release process is. I would guess if we just document it like the lua-client repo that would solve 80% of the friction.

@justinmk justinmk changed the title Release deployment via Travis Release process: document and/or automate Jan 21, 2020
@justinmk justinmk changed the title Release process: document and/or automate Release process: document, automate Jan 21, 2020
@blueyed
Copy link
Contributor Author

blueyed commented Jan 21, 2020

The main benefit here is also to ensure a predictable environment, to not include/upload unwanted files (just happened with pip 20 even (pypa/pip#7624)).

@bfredl
Copy link
Member

bfredl commented Jan 21, 2020

to not include/upload unwanted files

Currently I do this by diffing every release tarball against the last one. But if someone wants to write a nice script, that would be a welcome addition.

@justinmk
Copy link
Member

@bfredl are the steps to release written down somewhere? I actually have never done it for this repo, thus can't write them myself.

@bfredl
Copy link
Member

bfredl commented Jan 22, 2020

@justinmk Currently only in my zsh_history, but I will write something down (but nothing unexpected, really). But probably we want to improve the process to include the disabling of excessive logging (there is a script somewhere we could revive)

I think currently I'm the only one having ownership on the pynvim pypi package, I could add you to it if you have a pypi account.

@bfredl
Copy link
Member

bfredl commented Jan 25, 2020

I just made a release, and wrote down what I did at the same time:

  1. Create a release commit with the title "Pynvim x.y.z"

    • list significant changes in the commit message
    • bump the version in pynvim/util.py and setup.py (3 places in total)
  2. Make a release on github with the same commit/version tag and copy the message.

  3. run scripts/disable_log_statements.sh

  4. run python setup.py sdist

    • Here I usually diff the release tarball dist/pynvim-x.y.z.tar.gz against the previous one
  5. run twine upload -r pypi dist/pynvim-x.y.z.tar.gz (assumes you have a pypi account with permissions)

  6. run scripts/enable_log_statements.sh or git reset --hard to restore the working dir

justinmk added a commit to justinmk/pynvim that referenced this issue Jan 26, 2020
@justinmk justinmk mentioned this issue Jan 26, 2020
justinmk added a commit to justinmk/pynvim that referenced this issue Jan 26, 2020
@justinmk
Copy link
Member

justinmk commented Jan 26, 2020

Thanks, documented in #429.

That should be enough. I strongly believe we shouldn't spend time automating this in CI. Parts of it can't be automated (e.g. human needs to write the release notes, human needs to authenticate to pypi), and other parts are trivial compared to those tasks.

Something like a scripts/release.sh could be useful though. Just don't want to spend time babysitting CI stuff that will no doubt break in the future.

justinmk added a commit that referenced this issue Jan 26, 2020
@justinmk
Copy link
Member

run twine upload -r pypi dist/pynvim-x.y.z.tar.gz (assumes you have a pypi account with permissions)

I guess this replaces publish.sh ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants