Skip to content

Commit 77a0e48

Browse files
authored
Merge pull request #3 from solarwinds/gpoirier/publish
Configure publishing to NPM via GitHub Actions
2 parents 564e0a8 + a3d5a87 commit 77a0e48

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

.github/workflows/swov1_generation.yaml renamed to .github/workflows/sdk_generation.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ jobs:
2828
target: swov1
2929
secrets:
3030
github_access_token: ${{ secrets.GITHUB_TOKEN }}
31+
npm_token: ${{ secrets.SWO_NPM_TOKEN }}
3132
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

.github/workflows/sdk_publish.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish
2+
permissions:
3+
checks: write
4+
contents: write
5+
pull-requests: write
6+
statuses: write
7+
id-token: write
8+
"on":
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- swov1/.speakeasy/gen.lock
14+
workflow_dispatch: {}
15+
jobs:
16+
publish:
17+
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
18+
with:
19+
target: swov1
20+
secrets:
21+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
22+
npm_token: ${{ secrets.SWO_NPM_TOKEN }}
23+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

.speakeasy/workflow.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ targets:
1313
target: typescript
1414
source: swov1
1515
output: swov1
16+
publish:
17+
npm:
18+
token: $npm_token
1619
codeSamples:
1720
registry:
1821
location: registry.speakeasyapi.dev/swo/swo/solar-winds-observability-typescript-code-samples

0 commit comments

Comments
 (0)