diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6f72f89 --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work +go.work.sum + +# env file +.env diff --git a/plugin/plugin.go b/plugin/plugin.go index 303562a..97571a4 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -137,7 +137,7 @@ func Exec(ctx context.Context, args Args) error { return fmt.Errorf("error creating Gitea client %w", err) } - _, _, err = client.CreateRelease(args.Owner, args.Repo, gitea.CreateReleaseOption{ + release, _, err := client.CreateRelease(args.Owner, args.Repo, gitea.CreateReleaseOption{ TagName: tag, Title: title, Note: note, @@ -148,5 +148,8 @@ func Exec(ctx context.Context, args Args) error { return fmt.Errorf("error creating Gitea release %w", err) } + releaseURL := fmt.Sprintf("%s/%s/%s/releases/tag/%s", args.GiteaUrl, args.Owner, args.Repo, release.TagName) + fmt.Printf("Successfully created release at %s", releaseURL) + return err }