feat: output release url on success
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
RaviAnand Mohabir 2024-07-03 10:54:51 +02:00
parent 556122121b
commit 0d7cc87b37
2 changed files with 29 additions and 1 deletions

25
.gitignore vendored Normal file
View File

@ -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

View File

@ -137,7 +137,7 @@ func Exec(ctx context.Context, args Args) error {
return fmt.Errorf("error creating Gitea client %w", err) 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, TagName: tag,
Title: title, Title: title,
Note: note, Note: note,
@ -148,5 +148,8 @@ func Exec(ctx context.Context, args Args) error {
return fmt.Errorf("error creating Gitea release %w", err) 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 return err
} }