Skip to content

Commit

Permalink
feat: sdk action publishing improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-timothy-albert committed May 30, 2024
1 parent 73ab884 commit 905e347
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/git/releases.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (g *Git) CreateRelease(releaseInfo releases.ReleasesInfo, outputs map[strin
Body: github.String(fmt.Sprintf(`# Generated by Speakeasy CLI%s`, releaseInfo)),
})
if err != nil {
if _, _, err = g.client.Repositories.GetReleaseByTag(context.Background(), os.Getenv("GITHUB_REPOSITORY_OWNER"), getRepo(), *tagName); err != nil {
if release, _, err := g.client.Repositories.GetReleaseByTag(context.Background(), os.Getenv("GITHUB_REPOSITORY_OWNER"), getRepo(), *tagName); err == nil && release != nil {
fmt.Println(fmt.Sprintf("a github release with tag %s already existing ... skipping publishing"))

Check failure on line 73 in internal/git/releases.go

View workflow job for this annotation

GitHub Actions / Build

fmt.Sprintf format %s reads arg #1, but call has 0 args
fmt.Println(fmt.Sprintf("to publish this version again delete the github tag and release"))
if _, ok := outputs[fmt.Sprintf("publish_%s", lang)]; ok {
Expand Down

0 comments on commit 905e347

Please sign in to comment.