File tree 2 files changed +11
-7
lines changed
2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 4
4
name : Release F#
5
5
6
6
on :
7
- workflow_dispatch :
8
- # push:
9
- # tags:
10
- # - '*'
7
+ workflow_dispatch : # xxx
8
+ push :
9
+ tags :
10
+ - ' *'
11
11
12
12
permissions :
13
13
contents : write
Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ type RETURN_CODE =
38
38
| SUCCESS = 0
39
39
| FAIL = 1
40
40
41
+ let truncate ( valuesToTake : int ) ( args : string array ) : string array =
42
+ match valuesToTake = - 1 with
43
+ | true -> args
44
+ | false -> args |> Array.truncate valuesToTake
45
+
41
46
let getWorkflowNewPath () =
42
47
Path.Combine [| Directory.GetCurrentDirectory(); " workflow.new.yml" |]
43
48
@@ -65,11 +70,10 @@ let main (args: string array) : int =
65
70
let! workflowKey = GitHubHelpers.getWorkflowKey ()
66
71
67
72
let tags =
68
- match valuesToTake = - 1 with
69
- | true -> args
70
- | false -> args |> Array.truncate valuesToTake
73
+ args
71
74
|> Array.map ( fun s -> s.Split( ' ' ) |> Array.filter ( String.IsNullOrEmpty >> not ))
72
75
|> Array.concat // flat
76
+ |> truncate valuesToTake
73
77
74
78
do ! Validations.validateTagsAreNotEmpty tags
75
79
You can’t perform that action at this time.
0 commit comments