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

Autorelease workflow draft #885

Merged
merged 3 commits into from Jan 25, 2023
Merged

Autorelease workflow draft #885

merged 3 commits into from Jan 25, 2023

Conversation

Qwlouse
Copy link
Collaborator

@Qwlouse Qwlouse commented Aug 1, 2022

Adds a github actions workflow that triggers automatically on a version change and uploads the new version to pypi.
(based on https://github.com/marketplace/actions/pypi-github-auto-release )

Not sure how to best test this.

…rsion change and uploads the new version to pypi
@Qwlouse Qwlouse mentioned this pull request Aug 1, 2022
@AdamGleave
Copy link
Contributor

One way to test it is by uploading to Test PyPI on every push. imitation has it set up this way. The tricky part is that will fail if there are duplicate version numbers. You can either ensure version numbers are unique (by automatically generating them and including the Git ID as part of it), or just accept it'll fail but check that it fails for the "right" reason (duplicate version number not something different.

@thequilo
Copy link
Collaborator

@AdamGleave uploading to the PyPI test servers for every push seems a bit too much, doesn't it? But I don't really see another option for testing the release workflow, either.

@AdamGleave
Copy link
Contributor

Pushing to Test PyPI on every commit is the recommended approach by https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ Although as discussed I've run into problems with it, so take that recommendation with a grain of salt.

An alternative would be to push to test PyPI on commits to a specific branch?

@thequilo
Copy link
Collaborator

What branch would that be? If we use the master (i.e., on every PR merge), the frequency of uploads would be much smaller, but errors might slip through unnoticed. If it's the recommended way to upload to the test server on every commit, then it's probably not too much

@thequilo
Copy link
Collaborator

@Qwlouse can you also provide an API token for the test server?

@vnmabus
Copy link
Contributor

vnmabus commented Dec 29, 2022

@AdamGleave uploading to the PyPI test servers for every push seems a bit too much, doesn't it? But I don't really see another option for testing the release workflow, either.

Man, put the condition as:

on:
  release:
    types: [published]

and do the releases manually in Github!

A new Sacred release is necessary for it to work with the recent NumPy version.

@vnmabus
Copy link
Contributor

vnmabus commented Dec 29, 2022

@thequilo
Copy link
Collaborator

Okay, you convinced me that it's necessary to publish a new release to PyPI (and I am myself very annoyed by the fact that the latest release is basically unusable). Since we're not going to get a token on the test server, a new release on PyPI is more important than testing. Let's hope that everything goes well first try!

@thequilo thequilo merged commit 3ec6d81 into master Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants