How to run steps involving environment variables on both Linux and Windows #25071
-
I have this job that is supposed to upload builds to GitHub releases. It runs on both Linux and Windows. As Powershell is used as a shell for Windows builds, I have to use a different syntax to read the environment variable that stores credentials to upload to GitHub. Otherwise, my Windows builds would just fail. So I tried to add conditional steps. But now GitHub doesn’t run the action at all and instead errors with:
What is the suggested way of running the same steps in different shells when access to environment variables is necessary? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
‘shell’ is not recognized because it’s not the value of workflow context. As a workaround, you can use below condition instead. Typically you can use the context value for the condition filter when access to environment variable is necessary. Please check the link here for more details.
or
|
Beta Was this translation helpful? Give feedback.
‘shell’ is not recognized because it’s not the value of workflow context. As a workaround, you can use below condition instead.
Typically you can use the context value for the condition filter when access to environment variable is necessary. Please check the link here for more details.
or