I find the `uses` api not very intuitive (although...
# github-workflows-kt
j
I find the
uses
api not very intuitive (although it follows GitHub convention)
Copy code
uses(
            name = "Download common artifact",
            action = DownloadArtifactV2(
                name = "common-artifact",
                path = "python",
            )
        )
I was thinking about adding this syntactic sugar
fun step(name: String, condition: String? = null, action: () -> Action)
so that we can do something like this
Copy code
step("Download common artifact") {
            DownloadArtifactV2(
                name = "common-artifact",
                path = "python",
            )
        }
p
Yeah, I realize that and I don't like the current API either :) I added it because it was pretty straightforward comparing to YAML. I'm thinking about something like
ActionNameV2(arg1, arg2)
but I have no prototype yet. The goal is to mimic regular function calls: do this, then do that. It would be even more compact than YAML
Thanks for this feedback