From bd57bec15810361ce9c7e3aecb188e9ec2bd293a Mon Sep 17 00:00:00 2001 From: Logan Gingerich Date: Tue, 31 Dec 2024 14:19:51 -0500 Subject: [PATCH] update: re-configure publishing --- .github/workflows/sdk_generation.yaml | 1 + .github/workflows/sdk_publish.yaml | 23 +++++++++++++++++++++++ .speakeasy/workflow.yaml | 3 +++ 3 files changed, 27 insertions(+) create mode 100644 .github/workflows/sdk_publish.yaml diff --git a/.github/workflows/sdk_generation.yaml b/.github/workflows/sdk_generation.yaml index 65342d79..568cb4b4 100644 --- a/.github/workflows/sdk_generation.yaml +++ b/.github/workflows/sdk_generation.yaml @@ -26,4 +26,5 @@ jobs: set_version: ${{ github.event.inputs.set_version }} secrets: github_access_token: ${{ secrets.GITHUB_TOKEN }} + npm_token: ${{ secrets.NPM_TOKEN }} speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} diff --git a/.github/workflows/sdk_publish.yaml b/.github/workflows/sdk_publish.yaml new file mode 100644 index 00000000..420f6c1c --- /dev/null +++ b/.github/workflows/sdk_publish.yaml @@ -0,0 +1,23 @@ +name: Publish +permissions: + checks: write + contents: write + pull-requests: write + statuses: write + id-token: write +"on": + push: + branches: + - main + paths: + - .speakeasy/gen.lock + workflow_dispatch: {} +jobs: + publish: + uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15 + with: + target: firehydrant-typescript-sdk + secrets: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + npm_token: ${{ secrets.NPM_TOKEN }} + speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 7bd8d766..a188f71f 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -10,6 +10,9 @@ targets: firehydrant-typescript-sdk: target: typescript source: firehydrant-typescript-sdk-OAS + publish: + npm: + token: $npm_token codeSamples: registry: location: registry.speakeasyapi.dev/firehydrant/firehydrant/firehydrant-typescript-sdk-oas-code-samples