release

package
v0.3.0-rc.16 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand() *cobra.Command

NewCommand creates the manage-release command

Types

type Action

type Action string

Action represents the release management action to perform

const (
	ActionCreate     Action = "create"
	ActionUpdate     Action = "update"
	ActionLock       Action = "lock"
	ActionPrerelease Action = "prerelease"
	ActionPublish    Action = "publish"
	ActionDelete     Action = "delete"
)

func ValidateAction

func ValidateAction(action string) (Action, error)

ValidateAction checks if the action is valid

type GitHubRelease

type GitHubRelease struct {
	ID              int64  `json:"id"`
	TagName         string `json:"tag_name"`
	TargetCommitish string `json:"target_commitish"`
	Name            string `json:"name"`
	Body            string `json:"body"`
	Draft           bool   `json:"draft"`
	Prerelease      bool   `json:"prerelease"`
	URL             string `json:"url"`
	HTMLURL         string `json:"html_url"`
}

GitHubRelease represents a GitHub release

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles GitHub release operations

func NewManager

func NewManager(repo, token string) *Manager

NewManager creates a new release manager. It respects GITHUB_API_URL for GitHub Enterprise or test environments.

func NewManagerWithURL

func NewManagerWithURL(repo, token, baseURL string) *Manager

NewManagerWithURL creates a release manager with a custom API URL. Use this for testing or when GITHUB_API_URL isn't set.

func (*Manager) Manage

func (m *Manager) Manage(opts Options) (*Result, error)

Manage performs the specified release action

type Options

type Options struct {
	Action      Action
	Environment string
	SHA         string
	Tag         string
	Changelog   string
	PreviousTag string // Tag to compare against for "What's Changed" link
	NewTag      string // New tag for publish (semver) - replaces short-sha tag
	DeleteTag   string // Tag to delete after publish (short-sha cleanup)
	CreateTag   bool   // Whether to create the git tag (for initial release)
}

Options contains the parameters for release operations

type Result

type Result struct {
	ReleaseID  int64  `json:"release_id"`
	ReleaseURL string `json:"release_url"`
	HTMLURL    string `json:"html_url"`
}

Result contains the output of a release operation

Jump to

Keyboard shortcuts

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