publish

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package publish implements the `publish` verb: tag what landed and create its release.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdPublish

func NewCmdPublish(props *props.Props) *setup.Command

NewCmdPublish builds the `publish` command.

func Run

func Run(ctx context.Context, p *props.Props, opts *PublishOptions, w io.Writer) error

Run is RunPublish with its output injected.

func RunPublish

func RunPublish(ctx context.Context, p *props.Props, opts *PublishOptions, _ []string) error

RunPublish is the `publish` verb.

Types

type Options

type Options struct {
	Repo   string
	Target string
	Branch string
	Remote string
	Author tree.Author
}

Options are the command's inputs.

type Prepared

type Prepared struct {
	Request publish.Request

	// Held reports a hold in the manifest. A hold stops publish ACTING; it
	// does not stop the release being computed or its merge request being
	// maintained.
	Held       bool
	HoldReason string

	Forge remoteForge
}

Prepared is everything `publish` resolved before writing anything.

func Build

func Build(opts Options) (Prepared, error)

Build assembles the request from a repository, without touching a forge.

type PublishOptions

type PublishOptions struct {
	Repo   string
	Target string
	Branch string
	Remote string

	AuthorName  string
	AuthorEmail string
}

PublishOptions holds the command's flags.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL