Skip to content

Commit

Permalink
feat: update for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-timothy-albert committed May 9, 2024
1 parent 0bd0748 commit 6c9a733
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sdk-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
python setup.py sdist bdist_wheel
twine upload dist/*
- id: publish-event
uses: speakeasy-api/sdk-generation-action@v15
uses: speakeasy-api/sdk-generation-action@v15.9.0
if: always()
with:
github_access_token: ${{ secrets.github_access_token }}
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ outputs:
description: "The name of the publishing registry"
runs:
using: "docker"
image: "docker://ghcr.io/speakeasy-api/sdk-generation-action:v15"
image: "docker://ghcr.io/speakeasy-api/sdk-generation-action:v15.9.0"
env:
SPEAKEASY_API_KEY: ${{ inputs.speakeasy_api_key }}
SPEAKEASY_SERVER_URL: ${{ inputs.speakeasy_server_url }}
Expand Down
10 changes: 10 additions & 0 deletions internal/actions/publishEvent.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ func PublishEvent() error {
registryName := os.Getenv("INPUT_REGISTRY_NAME")
if registryName != "" {
event.PublishPackageRegistryName = &registryName
fmt.Println("REGISTRY NAME")
fmt.Println(registryName)
}

workingDir, err := os.Getwd() // in publishing working dir is the SDK output directory
Expand Down Expand Up @@ -71,11 +73,15 @@ func processPyPI(cfg *config.Config, event *shared.CliEvent, workingDir string,

if packageName != "" {
event.PublishPackageName = &packageName
fmt.Println("PACKAGE NAME")
fmt.Println(packageName)
}

if packageName != "" && version != "" {
publishURL := fmt.Sprintf("https://pypi.org/project/%s/%s/", packageName, version)
event.PublishPackageURL = &publishURL
fmt.Println("PUBLISH URL")
fmt.Println(publishURL)
}

return nil
Expand All @@ -85,10 +91,14 @@ func processPyPI(cfg *config.Config, event *shared.CliEvent, workingDir string,
func processLockFile(lockFile config.LockFile, event *shared.CliEvent) string {
if lockFile.ID != "" {
event.GenerateGenLockID = &lockFile.ID
fmt.Println("Lock File ID")
fmt.Println(lockFile.ID)
}

if lockFile.Management.ReleaseVersion != "" {
event.PublishPackageVersion = &lockFile.Management.ReleaseVersion
fmt.Println("RELEASE VERSION")
fmt.Println(lockFile.Management.ReleaseVersion)
}

if lockFile.Management.SpeakeasyVersion != "" {
Expand Down

0 comments on commit 6c9a733

Please sign in to comment.