Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,9 @@ jobs:
npm config set //registry.npmjs.org/:_authToken $NPM_AUTH_TOKEN
# print the NPM user name for validation
npm whoami
VERSION=$(node -p "require('./package.json').version" )
# Only publish stable versions to the latest tag
if [[ "$VERSION" =~ ^[^-]+$ ]]; then
NPM_TAG="latest"
else
NPM_TAG="beta"
fi
VERSION=$(< package.json | jq -r '.version')
# use the tag correlating to this release channel
NPM_TAG=$(< package.json | jq -r '.version | if contains("beta") then "public-preview" else if contains("alpha") then "private-preview" else "latest" end end')
echo "Publishing $VERSION with $NPM_TAG tag."
npm publish --otp="$(oathtool -b --totp $NPM_OTP)" --tag $NPM_TAG
env:
Expand Down
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,21 @@ const stripe = new Stripe('sk_test_...', {

### Public Preview SDKs

Stripe has features in the [public preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-beta.X` suffix like `15.2.0-beta.2`.
Stripe has features in the [public preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-beta.X` suffix like `18.6.0-beta.1`.
We would love for you to try these as we incrementally release new features and improve them based on your feedback.

To install, pick the latest version with the `beta` suffix by reviewing the [releases page](https://github.com/stripe/stripe-node/releases/) and use it in the below command
The easiest way to install a public-preview release is to use the dedicated npm tag:

```
npm install stripe@<replace-with-the-version-of-your-choice> --save
npm install stripe@public-preview --save
```

Or, to install a specific version from the [releases page](https://github.com/stripe/stripe-node/releases/), you can specify that version explicitly:

```
npm install stripe@<some-version>
# for example:
# npm install [email protected]
```

> **Note**
Expand All @@ -547,7 +555,11 @@ const stripe = new Stripe('sk_test_...', {

### Private Preview SDKs

Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `15.2.0-alpha.2`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-node?tab=readme-ov-file#public-preview-sdks) above and replacing the term `beta` with `alpha`.
Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-alpha.X` suffix like `18.6.0-alpha.1`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-node?tab=readme-ov-file#public-preview-sdks) above and replacing the term `public-preview` with `private-preview`:

```
npm install stripe@private-preview --save
```

### Custom requests

Expand Down
Loading