matryer / moq

Interface mocking tool for go generate
http://bit.ly/meetmoq
MIT License
2k stars 127 forks source link

Add goreleaser github action #174

Closed breml closed 2 years ago

breml commented 2 years ago

Requested in https://github.com/matryer/moq/pull/171#issuecomment-1084293950

matryer commented 2 years ago

@breml thanks for this - how does it work?

breml commented 2 years ago

@matryer The github action does trigger, when ever a new tag containing v[0-9]* is observed. What I normally do is, I create a new release on github and while doing so, I create the new version tag. This then triggers the release pipeline and uploads all the necessary release binaries as artifacts for the release.

While writing this, I just realized, that the regexp for the tag is maybe not the best one. I guess, something link v[0-9.]+ would be better (or even a more sophisticated regexp, which only triggers on a correct semver).

breml commented 2 years ago

According to https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#patterns-to-match-branches-and-tags, for semver the pattern would be v[0-9]+.[0-9]+.[0-9]+.