Cannot run github action to publish python package #25460
-
I am trying to run this workflow to publish a python package from the directory
or Here is the workflow file for quick view
UPDATE : Does it mean I add |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
ashwin-phadke:
No, the error means each step must contain (order doesn’t matter) either a There is one step in your workflow that doesn’t follow that rule:
ashwin-phadke:
You can just remove it. |
Beta Was this translation helpful? Give feedback.
-
Hi @ashwin-phadke, As the error mentioned, every step must define a
You can remove step. Instead of setting working directory for each step, you can set it in job level just once.
Doc here: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun Thanks |
Beta Was this translation helpful? Give feedback.
-
Thank you @weide-zhou , that helped, only one thing gives error now after I specified python versions using
Here is the error I get in actual build and publish part : and this is how I have specified python version in the workflow :
and I do
to install packages, I added --user option to overcome this error but it is still there. Here is the full updated workflow
UPDATE : adding |
Beta Was this translation helpful? Give feedback.
-
Thank you that helped. |
Beta Was this translation helpful? Give feedback.
-
Hi @ashwin-phadke, By default, the twine is installed in below location and runner can find it without issue:
If you install in user directory, system cannot find
Thanks |
Beta Was this translation helpful? Give feedback.
-
For me it is by default getting installed at /local/bin. |
Beta Was this translation helpful? Give feedback.
-
I used docker image. I installed the python packages successfully. But when I ran ModuleNotFoundError: No module named ‘django’ or rather not finding installed packages. |
Beta Was this translation helpful? Give feedback.
Hi @ashwin-phadke,
As the error mentioned, every step must define a
uses
orrun
key. However below step doens’t follow the rule:You can remove step. Instead of setting working directory for each step, you can set it in job level just once.
Doc here: https://docs.github.com/en/actions/refer…