From 3c67c889bf5b3270bd641641db638e8f8dea2a6e Mon Sep 17 00:00:00 2001 From: Ryan Albert <42415738+ryan-timothy-albert@users.noreply.github.com> Date: Thu, 9 May 2024 16:55:54 -0700 Subject: [PATCH] feat: test publishing tracking (#126) --- .github/workflows/sdk-publish.yaml | 1 + action.yml | 3 +++ internal/actions/publishEvent.go | 3 +++ 3 files changed, 7 insertions(+) diff --git a/.github/workflows/sdk-publish.yaml b/.github/workflows/sdk-publish.yaml index ddcaca69..b4965a2a 100644 --- a/.github/workflows/sdk-publish.yaml +++ b/.github/workflows/sdk-publish.yaml @@ -144,6 +144,7 @@ jobs: action: publish-event speakeasy_api_key: ${{ secrets.speakeasy_api_key }} speakeasy_server_url: ${{ inputs.speakeasy_server_url }} + target_directory: ${{ needs.release.outputs.python_directory }} registry_name: "pypi" env: GH_ACTION_RESULT: ${{ job.status }} diff --git a/action.yml b/action.yml index dec56e69..f1069d8b 100644 --- a/action.yml +++ b/action.yml @@ -143,6 +143,8 @@ outputs: description: "The location of the OpenAPI document used for generation" registry_name: description: "The name of the publishing registry" + target_directory: + description: "The directory the SDK target was generated to" runs: using: "docker" image: "docker://ghcr.io/speakeasy-api/sdk-generation-action:v15" @@ -168,4 +170,5 @@ runs: - ${{ inputs.target }} - ${{ inputs.registry_tags }} - ${{ inputs.registry_name }} + - ${{ inputs.target_directory }} diff --git a/internal/actions/publishEvent.go b/internal/actions/publishEvent.go index 46431150..fcb48cac 100644 --- a/internal/actions/publishEvent.go +++ b/internal/actions/publishEvent.go @@ -25,6 +25,9 @@ func PublishEvent() error { return err } + fmt.Println(workingDir) + fmt.Println(os.Getenv("INPUT_TARGET_DIRECTORY")) + loadedCfg, err := config.Load(workingDir) if err != nil { return err