goreleaser / goreleaser-action

GitHub Action for GoReleaser
https://github.com/marketplace/actions/goreleaser-action
MIT License
865 stars 78 forks source link

Wrong commit sha to find tag for #315

Closed KnisterPeter closed 2 years ago

KnisterPeter commented 2 years ago

If goreleaser-action runs with a workdir option, the tag is taken from the wrong directory. This does fail if using submodules

https://github.com/goreleaser/goreleaser-action/blob/5df302e5e9e4c66310a6b6493a8865b12c555af2/src/main.ts#L32

caarlos0 commented 2 years ago

you are trying to release the submodule from the parent project?

not sure I understand what you're trying to do...

KnisterPeter commented 2 years ago

What we are trying is this:

git-project  # <--- root where the tag is taken from
+--> submodule   # <--- workdir to run goreleaser on

We use goreleaser-actions to create a release. We do set the workdir to submodule, because it's the submodule we want to create a release for. The action, before going into the submodule and execute there, does fetch information from the top-level.

Does that explain our case a bit better?

caarlos0 commented 2 years ago

yes, thank you for the explanation :)

that is not supported...

you should probably have a release process for each submodule in their own project (and tag them instead of the parent).

closing as working as intended.