CreateRelease creates a Github Release, attaching the given files as release assets If a release already exist, up in Github, this function will attempt to attach the given files to it.
(tag, branch, desc string, filepaths []string)
| 184 | // CreateRelease creates a Github Release, attaching the given files as release assets |
| 185 | // If a release already exist, up in Github, this function will attempt to attach the given files to it. |
| 186 | func CreateRelease(tag, branch, desc string, filepaths []string) { |
| 187 | release := Release{ |
| 188 | TagName: tag, |
| 189 | Name: tag, |
| 190 | Prerelease: false, |
| 191 | Draft: false, |
| 192 | Branch: branch, |
| 193 | Body: desc, |
| 194 | } |
| 195 | publishRelease(release, filepaths) |
| 196 | } |
| 197 | |
| 198 | func publishRelease(release Release, filepaths []string) { |
| 199 | endpoint := fmt.Sprintf("%s/releases", githubAPIEndpoint) |
nothing calls this directly
no test coverage detected