MCPcopy Create free account
hub / github.com/drone-plugins/drone-github-release / run

Function run

main.go:126–160  ·  view source on GitHub ↗
(c *cli.Context)

Source from the content-addressed store, hash-verified

124}
125
126func run(c *cli.Context) error {
127 if c.String("env-file") != "" {
128 _ = godotenv.Load(c.String("env-file"))
129 }
130
131 plugin := Plugin{
132 Repo: Repo{
133 Owner: c.String("repo.owner"),
134 Name: c.String("repo.name"),
135 },
136 Build: Build{
137 Event: c.String("build.event"),
138 },
139 Commit: Commit{
140 Ref: c.String("commit.ref"),
141 },
142 Config: Config{
143 APIKey: c.String("api-key"),
144 Files: c.StringSlice("files"),
145 FileExists: c.String("file-exists"),
146 Checksum: c.StringSlice("checksum"),
147 ChecksumFile: c.String("checksum-file"),
148 ChecksumFlatten: c.Bool("checksum-flatten"),
149 Draft: c.Bool("draft"),
150 Prerelease: c.Bool("prerelease"),
151 BaseURL: c.String("base-url"),
152 UploadURL: c.String("upload-url"),
153 Title: c.String("title"),
154 Note: c.String("note"),
155 Overwrite: c.Bool("overwrite"),
156 },
157 }
158
159 return plugin.Exec()
160}

Callers

nothing calls this directly

Calls 1

ExecMethod · 0.95

Tested by

no test coverage detected