From 609d33130b99574d1bf803c410cfe8691635d25f Mon Sep 17 00:00:00 2001 From: 64J0 Date: Thu, 20 Jun 2024 20:19:02 -0300 Subject: [PATCH 1/2] fix: valuesToTake --- src/Program.fs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Program.fs b/src/Program.fs index 059f831..f775ffa 100644 --- a/src/Program.fs +++ b/src/Program.fs @@ -38,6 +38,11 @@ type RETURN_CODE = | SUCCESS = 0 | FAIL = 1 +let truncate (valuesToTake: int) (args: string array) : string array = + match valuesToTake = -1 with + | true -> args + | false -> args |> Array.truncate valuesToTake + let getWorkflowNewPath () = Path.Combine [| Directory.GetCurrentDirectory(); "workflow.new.yml" |] @@ -65,11 +70,10 @@ let main (args: string array) : int = let! workflowKey = GitHubHelpers.getWorkflowKey () let tags = - match valuesToTake = -1 with - | true -> args - | false -> args |> Array.truncate valuesToTake + args |> Array.map (fun s -> s.Split(' ') |> Array.filter (String.IsNullOrEmpty >> not)) |> Array.concat // flat + |> truncate valuesToTake do! Validations.validateTagsAreNotEmpty tags From 5c455a3baf9c542800c28e72fbd46e01182da01b Mon Sep 17 00:00:00 2001 From: 64J0 Date: Thu, 20 Jun 2024 20:19:17 -0300 Subject: [PATCH 2/2] chore: enable the publish action again --- .github/workflows/release-fsharp.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-fsharp.yml b/.github/workflows/release-fsharp.yml index 6e527dd..8f8b258 100644 --- a/.github/workflows/release-fsharp.yml +++ b/.github/workflows/release-fsharp.yml @@ -4,10 +4,10 @@ name: Release F# on: - workflow_dispatch: - # push: - # tags: - # - '*' + workflow_dispatch: # xxx + push: + tags: + - '*' permissions: contents: write