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

Enable manual triggering of the PyPI release workflow #317

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

drbenvincent
Copy link
Collaborator

@drbenvincent drbenvincent commented Apr 6, 2024

When I released 0.2.3, the release.yml workflow (which uploads a new version to PyPI) failed. The cause of this was fixed in #316. I want to manually trigger this action so that 0.2.3 gets uploaded to PyPI without having to do another version bump.

It should be possible to manually trigger this workflow through the GitHub webpage https://github.com/pymc-labs/CausalPy/actions/workflows/release.yml but currently there is no "Run Workflow" button. I followed the instructions here https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow?tool=webui and have basically added workflow_dispatch as another trigger for this action. If I've done this correctly then this should enable manual triggering of this action through the GitHub webpage.

Though I'm not sure this alone will work, because there are additional requirements for some of the steps, e.g. if: github.event_name == 'release' && github.event.action == 'published' for the publish job.

@drbenvincent drbenvincent added the devops DevOps related label Apr 6, 2024
@drbenvincent drbenvincent requested a review from lucianopaz April 6, 2024 08:40
Copy link

codecov bot commented Apr 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.10%. Comparing base (dbaa17b) to head (c721c66).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #317   +/-   ##
=======================================
  Coverage   77.10%   77.10%           
=======================================
  Files          21       21           
  Lines        1380     1380           
=======================================
  Hits         1064     1064           
  Misses        316      316           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@drbenvincent
Copy link
Collaborator Author

If this is tricky, it could be surplus to requirements. I am always able to manually upload to PyPI with my API tokens.

@lucianopaz
Copy link
Collaborator

Sorry that I missed the request for reviewing some days ago. If what you want is to be able to push a release to pypi if the release workflow failed, then you don’t need this.
Pypi releases are different from GitHub releases. Pypi releases cannot be amended. If you make a mistake, you can remove a release number from pypi, but you’ll never be able to use that release number again. That’s why pypi forces you to have to push a new release number always.
GitHub releases are completely different. You can amend their release notes, you can delete them and then push them again using the exact same number as before. The only limitation is that if your upload to pypi succeeded, then you shouldn’t try to change the contents of the GitHub release (you still can do it, but the changes won’t be pushed up to pypi).
So you can remove the 0.2.3 release and tag from GitHub, and then start the 0.2.3 release again using the fixed commit. The workflow should run successfully and finally push to pypi.

@drbenvincent
Copy link
Collaborator Author

Thanks, and sorry for the delayed reply @lucianopaz. From what I recall, the PyPI workflow failed so the 0.2.3 never really got initiated on PyPI. So I just manually ran through the PyPI release workflow and now there is a CausalPy 0.2.3 on PyPI.

So if I understand correctly we can just close this PR?

@drbenvincent drbenvincent marked this pull request as draft May 6, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops DevOps related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants