Skip to content

Commit

Permalink
[DEVEX-716] add publish target (#10)
Browse files Browse the repository at this point in the history
* speakeasy configure publish

* set major version to 2.0.0 to force a major version bump on npm

* update readme
  • Loading branch information
shippo-lueders authored Apr 24, 2024
1 parent 4634342 commit 2e10b87
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/sdk_generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
npm_token: ${{ secrets.NPM_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
15 changes: 15 additions & 0 deletions .github/workflows/sdk_publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Publish
"on":
push:
branches:
- main
paths:
- RELEASES.md
- '*/RELEASES.md'
jobs:
publish:
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
npm_token: ${{ secrets.NPM_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
typescript:
version: 0.1.0
version: 2.0.0
additionalDependencies:
dependencies: {}
devDependencies:
Expand Down
3 changes: 3 additions & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ targets:
first-target:
target: typescript
source: openapi
publish:
npm:
token: $npm_token
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ api_key_header="ShippoToken shippo_test_595d9cb0c0e14497bf07e75ecfec6c6d"
### NPM

```bash
npm add https://github.com/goshippo/shippo-javascript-sdk
npm add shippo
```

### Yarn

```bash
yarn add https://github.com/goshippo/shippo-javascript-sdk
yarn add shippo
```
<!-- End SDK Installation [installation] -->

Expand Down

0 comments on commit 2e10b87

Please sign in to comment.