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

Create GitHub Action to auto-publish to PyPI #669

Open
whimboo opened this issue Apr 15, 2024 · 14 comments · Fixed by #686
Open

Create GitHub Action to auto-publish to PyPI #669

whimboo opened this issue Apr 15, 2024 · 14 comments · Fixed by #686
Milestone

Comments

@whimboo
Copy link
Contributor

whimboo commented Apr 15, 2024

When a new release of mozdownload is created we should use the pypi-publish GitHub action to automatically publish the release on https://pypi.org/project/mozdownload/.

@whimboo whimboo added this to the 1.29.0 milestone Apr 15, 2024
@libialany
Copy link
Contributor

I want to contribute, I'm familiar with GitHub Actions.

@whimboo
Copy link
Contributor Author

whimboo commented May 21, 2024

Thank you a lot @libialany! I'm looking forward to get your PR #683 reviewed and landed.

@whimboo
Copy link
Contributor Author

whimboo commented Jul 17, 2024

Re-opening because we need a follow-up PR for the remaining issue. @libialany would you be interested to work on that?

@whimboo whimboo reopened this Jul 17, 2024
@libialany
Copy link
Contributor

I want. Thank you @whimboo . I have two questions: If you accept a merge request, should the GitHub Action to auto-publish run successfully(build, deploy)? Additionally, if the maintainer makes a small change, should the GitHub Action run again? In both cases, right(build, deploy)?

@whimboo
Copy link
Contributor Author

whimboo commented Aug 1, 2024

Actually I wonder if we could change the workflow to not run based on a merge, but when adding a new (release) tag to the repository. That is actually the moment when all the files are ready to get published, and therefore I use the create a new release feature on Github which doesn't have a PR.

Based on that we most likely also don't need the test jobs to run but just the build and deployment steps.

@libialany
Copy link
Contributor

Thank you, @whimboo!

I have an idea for handling releases. For instance, I could trigger an action only when a tag is pushed. Here’s a sample configuration:

on:
  push:
    tags: ['1.[0-9]+.[0-9]+']
jobs:
  on-success:
 ......

Is this the correct way to set it up?, I noticed that the tags consistently start with "1.".

@whimboo
Copy link
Contributor Author

whimboo commented Sep 6, 2024

@libialany Running the action based on a created tag sounds fine with me. But note that we cannot limit it to a name starting with 1.. If there is a backward incompatible change in mozdownload we would have to bump the major version. As such we could do it for each and every tag without restriction. So using - '*' should be fine. Otherwise we could also use a regex like - '[0-9]+.[0-9]+.[0-9]+' to not accidentally run the action if a non-release tag gets added - but that shouldn't happen.

@whimboo
Copy link
Contributor Author

whimboo commented Dec 3, 2024

@libialany I just stumbled over this issue again and wondered if you are still interested in this follow-up fix for the release action. Please let me know. Thanks!

@libialany
Copy link
Contributor

Apologies for the delayed! I'd be happy to continue with this issue.

@whimboo
Copy link
Contributor Author

whimboo commented Dec 4, 2024

Sounds great. And thanks a lot for your update!

@libialany
Copy link
Contributor

Sorry. I'll try to provide an update by next week. This week, I'm a bit busy.

@whimboo whimboo modified the milestones: 1.29.0, 1.30.0 Dec 11, 2024
@whimboo
Copy link
Contributor Author

whimboo commented Dec 11, 2024

@libialany good news! I just released the 1.29.0 release and used your created release action. Publishing to PyPI worked out pretty well! Thanks again for that work which is pretty helpful. Now lets get the remaining changes in as well, but take your time.

@libialany
Copy link
Contributor

thank you

@whimboo
Copy link
Contributor Author

whimboo commented Jan 7, 2025

Sorry. I'll try to provide an update by next week. This week, I'm a bit busy.

Hi @libialany. I wanted to check back with you regarding an update for this remaining item for this issue. Will you have the time to provide a PR? Thanks.

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 a pull request may close this issue.

2 participants