mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 03:13:49 +08:00
Build: Add github release command to build/cmd (#56349)
* Add github release command to build/cmd * Use go-github library and implement dry-run * Make tag optional and default to metadata * Fix minor bug with tag default * Make some refactors to ease testing * Add tests for publish github command * Refactor publish github tests * Refactor test helper function name * Isolate local test
This commit is contained in:

committed by
GitHub

parent
4b68918b0b
commit
96a97f9827
@ -232,6 +232,32 @@ func main() {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "github",
|
||||
Usage: "Publish packages to GitHub releases",
|
||||
Action: PublishGitHub,
|
||||
Flags: []cli.Flag{
|
||||
&dryRunFlag,
|
||||
&cli.StringFlag{
|
||||
Name: "path",
|
||||
Required: true,
|
||||
Usage: "Path to the asset to be published",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "repo",
|
||||
Required: true,
|
||||
Usage: "GitHub repository",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tag",
|
||||
Usage: "Release tag (default from metadata)ß",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "create",
|
||||
Usage: "Create release if it doesn't exist",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user