chore: bump sdk to v1.5.0
This commit is contained in:
parent
fa883499d0
commit
5a37d05e67
1 changed files with 14 additions and 31 deletions
8
main.go
8
main.go
|
|
@ -39,8 +39,6 @@ type ReleaseAction struct {
|
|||
}
|
||||
|
||||
func (action *ReleaseAction) setup() error {
|
||||
var err error
|
||||
|
||||
action.repository = action.GetInput("repository")
|
||||
if ok, err := regexp.MatchString(`^(\w+)/(\w+)$`, action.repository); !ok || err != nil {
|
||||
return fmt.Errorf("input 'repository': is empty or does not match <onwer>/<repo>")
|
||||
|
|
@ -69,17 +67,19 @@ func (action *ReleaseAction) setup() error {
|
|||
|
||||
// draft might be a bool constant or a regex which determins if it is
|
||||
// a draft by matching against the input version
|
||||
action.draft, err = pattern("draft")
|
||||
draft, err := pattern("draft")
|
||||
if err != nil {
|
||||
return fmt.Errorf("input 'draft': is not a bool or a valid regex")
|
||||
}
|
||||
action.draft = draft
|
||||
|
||||
// prerelease might be a bool constant or a regex which determins if it is
|
||||
// a prelease by matching against the input version
|
||||
action.prerelease, err = pattern("prerelease")
|
||||
prerelease, err := pattern("prerelease")
|
||||
if err != nil {
|
||||
return fmt.Errorf("input 'prerelease': is not a bool or a valid regex")
|
||||
}
|
||||
action.prerelease = prerelease
|
||||
|
||||
action.label = action.GetInput("label")
|
||||
action.notes = action.GetInput("notes")
|
||||
|
|
|
|||
Loading…
Reference in a new issue