diff --git a/DOCS.md b/DOCS.md index e5badea..c39d797 100644 --- a/DOCS.md +++ b/DOCS.md @@ -13,8 +13,7 @@ Sample configuration: publish: github_release: api_key: my_github_api_key - files: - - dist/* + files: dist/* checksum: sha1 ``` @@ -26,6 +25,7 @@ publish: api_key: my_github_api_key files: - dist/* + - bin/binary.exe checksum: - md5 - sha1 diff --git a/main.go b/main.go index 7c28b98..67c4b76 100644 --- a/main.go +++ b/main.go @@ -60,7 +60,7 @@ func main() { } var files []string - for _, glob := range vargs.Files { + for _, glob := range vargs.Files.Slice() { globed, err := filepath.Glob(glob) if err != nil { fmt.Printf("Failed to glob %s\n", glob) diff --git a/types.go b/types.go index 0dc5e86..295d5f7 100644 --- a/types.go +++ b/types.go @@ -7,6 +7,6 @@ type Params struct { BaseURL string `json:"base_url"` UploadURL string `json:"upload_url"` APIKey string `json:"api_key"` - Files []string `json:"files"` + Files drone.StringSlice `json:"files"` Checksum drone.StringSlice `json:"checksum"` }