[FR] Make another action `CodSpeedHQ/setup-codspeed`
I have a use-case where I'd like to have the codspeed executable made available (perhaps also pre-authenticated) but then I'd need to call it myself in a way that this action can't (in my own wrappers). I've filed https://github.com/CodSpeedHQ/runner/issues/135 and it'd help me solve this on one level but I believe that this action would also need bit of refurb in the context of GHA traditions.
GitHub has official recommendation for making actions that expose CLI tools in workflow jobs that suggest using the setup-$TOOL pattern or naming. All their official actions follow this principle (actions/setup-python, actions/setup-node etc.), and also third parties aren't that far behind (astral-sh/setup-uv).
See: https://docs.github.com/en/actions/how-tos/create-and-publish-actions/create-a-cli-action.
This is basically what I'd like the action to do:
- Self-bootstrapping (making
codspeedavailable on$PATH) - Optional caching if applicable.
- Optional call to
codspeed authfor saving the token in a config on disk. - Never invoking
codspeed run - During teardown, remove the token from disk (
runs.postrequires the action to be JS-based, though: https://docs.github.com/en/actions/reference/workflows-and-actions/metadata-syntax#runspost)
This would have been useful for my use case: I have a repository with multiple Go modules and as such I need to repeatedly run codspeed run for multiple Go modules.
You can see my current attempt at a workaround (mostly just copying things from the implementation of this action) over at open-telemetry/opentelemetry-collector/pull/14160
Honestly, I have other problems with this, like invoking an unversioned script from the internet..