Skip to content

Conversation

@yanoom
Copy link
Contributor

@yanoom yanoom commented May 5, 2020

New action uses a dedicated docker container with Poetry.
It builds the package and pushes it to pypi.org.
Add version badge to README.md (+switched coverage badge to shields.io)

@MatanRubin MatanRubin force-pushed the yanay_add_action_publish_to_pypi branch from 35b16ec to f480a80 Compare May 6, 2020 11:16
@MatanRubin
Copy link
Member

Please make sure:

  1. We can only run "publish" from master
  2. "publish" is a manual action

@yanoom
Copy link
Contributor Author

yanoom commented May 6, 2020

  • Verify Pypi returns error when publishing same version again

@yanoom
Copy link
Contributor Author

yanoom commented May 6, 2020

2. "publish" is a manual action

As far as I see (like we've discussed), I don't see the option to trigger the workflow manually built-in.
I suggest we use Github's "release" feature with:

on:
  release:
    types: [published]

https://help.github.com/en/actions/reference/events-that-trigger-workflows#release-event-release

Seams like a good (and correct) solution to me (also solves the first requirement)...
2 more possible solutions, which I'm not in favor of:


There is this 3rd party tool which looks nice:
https://www.actionspanel.app/


There is also the option to trigger "repository_dispatch" with an HTTP-POST request:
https://goobar.io/2019/12/07/manually-triggering-github-actions-workflows-using-postman/

@yanoom yanoom force-pushed the yanay_add_action_publish_to_pypi branch from 70711b7 to 2b48b1f Compare May 6, 2020 12:39
@yanoom
Copy link
Contributor Author

yanoom commented May 6, 2020

Verified "re-publish" (same version) fails:
image

@yanoom yanoom force-pushed the yanay_add_action_publish_to_pypi branch 2 times, most recently from 954d3c1 to b00c0ad Compare May 6, 2020 14:56
New action uses a dedicated docker container with Poetry.
It builds the package and pushes it to pypi.org.
Add version badge to README.md (+switched coverage badge to shields.io)
Add link to all badges
@yanoom yanoom force-pushed the yanay_add_action_publish_to_pypi branch from b00c0ad to bd342e3 Compare May 6, 2020 17:35
@MatanRubin MatanRubin merged commit f707a77 into master May 12, 2020
@MatanRubin MatanRubin deleted the yanay_add_action_publish_to_pypi branch May 12, 2020 08:58
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.

3 participants