Skip to content

Commit

Permalink
feat: unnecesarry after testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-timothy-albert committed Oct 11, 2024
1 parent c8d3959 commit 97c5e60
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions internal/actions/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import (
"strings"

"github.com/speakeasy-api/sdk-generation-action/internal/configuration"
"github.com/speakeasy-api/sdk-generation-action/internal/run"
"golang.org/x/exp/slices"

"github.com/speakeasy-api/sdk-generation-action/internal/environment"
"github.com/speakeasy-api/sdk-generation-action/internal/logging"
"github.com/speakeasy-api/sdk-generation-action/internal/run"
"github.com/speakeasy-api/sdk-generation-action/pkg/releases"
)

Expand All @@ -28,7 +26,6 @@ func Release() error {

dir := "."
usingReleasesMd := false
outputs := map[string]string{}
var providesExplicitTarget bool
if specificTarget := environment.SpecifiedTarget(); specificTarget != "" {
workflow, err := configuration.GetWorkflowAndValidateLanguages(true)
Expand All @@ -42,16 +39,6 @@ func Release() error {

dir = filepath.Join(environment.GetWorkingDirectory(), dir)

// don't release if publishing is not configured
if target.Publishing == nil && !slices.Contains([]string{"go", "terraform"}, target.Target) {
outputs[fmt.Sprintf("%s_directory", target.Target)] = dir
if err = setOutputs(outputs); err != nil {
return err
}
fmt.Println(fmt.Sprintf("Publishing configuration does not exist in workflow.yaml for target %s ... skipping release", specificTarget))
return nil
}

providesExplicitTarget = true
}
}
Expand Down Expand Up @@ -85,6 +72,7 @@ func Release() error {
}
}

outputs := map[string]string{}
for lang, info := range latestRelease.Languages {
outputs[fmt.Sprintf("%s_regenerated", lang)] = "true"
outputs[fmt.Sprintf("%s_directory", lang)] = info.Path
Expand Down

0 comments on commit 97c5e60

Please sign in to comment.