diff --git a/pkg/releaser/releaser.go b/pkg/releaser/releaser.go index d2932899..b4f5c8f9 100644 --- a/pkg/releaser/releaser.go +++ b/pkg/releaser/releaser.go @@ -309,7 +309,6 @@ func (r *Releaser) CreateReleases() error { if len(packages) == 0 { return errors.Errorf("no charts found at %s", r.config.PackagePath) } - worktree, err := r.git.AddWorktree("", r.config.Remote+"/"+r.config.PagesBranch) if err != nil { return err @@ -364,13 +363,13 @@ func (r *Releaser) CreateReleases() error { if err := r.git.Commit(worktree, fmt.Sprintf("Publishing chart package for %s", releaseName)); err != nil { return err } - - if err := r.pushToPagesBranch(worktree); err != nil { - return err - } } } + if err := r.pushToPagesBranch(worktree); err != nil { + return err + } + return nil }