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

GitHub action to automatically publish new releases to PyPi #448

Merged
merged 7 commits into from
Feb 9, 2024

Conversation

morphine00
Copy link
Contributor

Hi, Bruno Ferreira from MLCommons Systems here. This GitHub action should trigger whenever a new release is created and automatically build and publish the package to PyPi. The build commands use Twine to build the package.

@morphine00 morphine00 requested a review from a team as a code owner January 17, 2024 01:38
Copy link

github-actions bot commented Jan 17, 2024

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

Copy link
Contributor

@marcenacp marcenacp left a comment

Choose a reason for hiding this comment

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

Hey Bruno, thanks a lot for this! I have a few comments, but I'm looking forward to merging in order to try on a real deployment

env:
LOGLEVEL: DEBUG

# dispatch:
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this commented section?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can remove it if you wish. We just left that in as a placeholder as in the future Croissant might wish to publish the package to multiple repositories at once, and that section of the action can be tweaked to enable that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove the commented section? If you want to add a hint for future developers, that'd be great. Maybe a comment explaining what you just said with a link to the example in mlcommons/mlcube. Something like:

# If you wish to publish the package to multiple repositories at once, get inspiration from
# https://github.com/mlcommons/mlcube/blob/master/.github/workflows/python-publish.yml.

release:
types: [created]

jobs:
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be triggered manually?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure I'm following, sorry :) Whenever you post a release in GitHub, the action gets triggered to build and upload it to PyPi. Unless you mean that the creation of a release itself is manual?

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the explanation, I didn't know you'd have to post a release. Can you maybe update the documentation?

Copy link
Contributor

@marcenacp marcenacp left a comment

Choose a reason for hiding this comment

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

@morphine00 Hey Bruno, just made a few comments and I think we can merge :) Thanks!

@morphine00
Copy link
Contributor Author

Hi @marcenacp , sorry for the delay getting back to this, got lost in the shuffle. I added the changes you requested, can you double-check? Let me know if you need anything more, thanks.

@marcenacp marcenacp merged commit e9edaa7 into mlcommons:main Feb 9, 2024
12 of 14 checks passed
@marcenacp marcenacp deleted the publish-action-prod branch February 9, 2024 12:01
@github-actions github-actions bot locked and limited conversation to collaborators Feb 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants