Skip to content

Latest commit

 

History

History
112 lines (90 loc) · 7.74 KB

File metadata and controls

112 lines (90 loc) · 7.74 KB

Release Guide

We ship fast and often.

We plan what new features we want to release in any given week, but we do not batch up features into one weekly release. Generally speaking, as soon as an individual feature is completed and merged into main, it should be released. Likewise, as soon as a bug is fixed, the fix should be released. On occasion, we may batch up multiple features that are expected to land the same day, but this happens on main, there is no release branch involved. In this case, we simply do not cut a new release until all the expected features land.

This allows us to avoid having to maintain release branches while ensuring that users are always able to use the latest features of the CDP SDK.

Publishing

This section contains step-by-step instructions for publishing new versions of the CDP SDK.

Tip

When publishing a feature that has landed in both languages, you should release each one individually. Do not create one PR that contains the bump for both languages. This will make it easier to tag each package individually. You should follow the instructions for one language to completion, then move on to the next other language.

TypeScript

First time setup

For PR linking and author attribution, you'll need a GitHub Personal Access Token.

  1. Go to https://github.com/settings/tokens and create a GitHub PAT with read:user and repo:status scopes. This is for author attribution
  2. Export your token in your shell (export GITHUB_TOKEN={YOUR_TOKEN}), and optionally save it to your shell profile (echo "\nexport GITHUB_TOKEN={YOUR_TOKEN}" >> ~/.zshrc)

Publishing

Follow these steps to publish a new version of the TypeScript CDP SDK.

  1. Ensure you are on the main branch and have the latest changes
  2. Create a new branch for your changes, e.g. bump/ts. The branch name doesn't matter, and you will delete this branch after the release
  3. From the typescript folder, run pnpm changeset:version to automatically bump the version and create a new changelog. Make note of the new version, as this will be used in subsequent steps
  4. Manually update src/version.ts with the new version
  5. Add and commit the changes with the message: chore: bump @coinbase/cdp-sdk to {NEW_VERSION}
  6. Push your branch, create a PR and get an approval
  7. Once approved, merge your PR
  8. Once merged, manually trigger the Publish @coinbase/cdp-sdk workflow
  9. Once the workflow has completed, go back to the main branch and pull the latest changes
  10. Tag the new version with git tag -s @coinbase/cdp-sdk@v{NEW_VERSION} -m "Release @coinbase/cdp-sdk {NEW_VERSION}"
  11. Push the tag with git push origin @coinbase/cdp-sdk@v{NEW_VERSION}
  12. Delete your release branch

Python

Follow these steps to publish a new version of the Python CDP SDK.

  1. Ensure you are on the main branch and have the latest changes
  2. Create a new branch for your changes, e.g. bump/py. The branch name doesn't matter, and you will delete this branch after the release
  3. Calculate the new version by looking at the files in the changelog.d folder:
    • If there is a file ending in removal.md, this is a major version bump
    • If there is a file ending in feature.md, this is a minor version bump
    • If there is a file ending in bugfix.md, this is a patch version bump
    • For example, if the current version is 1.0.0 and there is both a 123.feature.md and 456.bugfix.md, the new version will be 1.1.0
  4. Update the version number in the following files in the python/ folder with the new version:
    • pyproject.toml
    • cdp/__version__.py
    • docs/conf.py
  5. Run uv run towncrier build --yes --version={NEW_VERSION} to update the changelog
  6. Add and commit all the changes with the message: chore: bump cdp-sdk to {NEW_VERSION}
  7. Push your branch, create a PR and get an approval
  8. Once approved, merge your PR
  9. Once merged, manually trigger the Publish cdp-sdk workflow
  10. Once the workflow has completed, go back to the main branch and pull the latest changes
  11. Tag the new version with git tag -s cdp-sdk@v{NEW_VERSION} -m "Release cdp-sdk {NEW_VERSION}"
  12. Push the tag with git push origin cdp-sdk@v{NEW_VERSION}
  13. Delete your release branch
  14. Trigger the Deploy CDP SDK documentation to GitHub Pages action. Select python as the language to deploy

Rust

Follow these steps to publish a new version of the Rust CDP SDK.

  1. Ensure you are on the main branch and have the latest changes
  2. Create a new branch for your changes, e.g. bump/rust. The branch name doesn't matter, and you will delete this branch after the release
  3. Calculate the new version by looking at the files in the rust/changelog.d folder:
    • If there is a file ending in removal.md, this is a major version bump
    • If there is a file ending in feature.md, this is a minor version bump
    • If there is a file ending in bugfix.md, this is a patch version bump
    • For example, if the current version is 1.0.0 and there is both a 123.feature.md and 456.bugfix.md, the new version will be 1.1.0
  4. Update the version number in rust/Cargo.toml
  5. From the rust folder, run git cliff --unreleased --tag v{NEW_VERSION} --prepend CHANGELOG.md to update the changelog
  6. Remove all files from rust/changelog.d/ except .gitignore
  7. Add and commit all the changes with the message: chore(rust): bump cdp-sdk to {NEW_VERSION}
  8. Push your branch, create a PR and get an approval
  9. Once approved, merge your PR
  10. Once merged, manually trigger the Publish cdp-sdk (Rust) workflow
  11. Once the workflow has completed, go back to the main branch and pull the latest changes
  12. Tag the new version with git tag -s cdp-sdk-rust@v{NEW_VERSION} -m "Release cdp-sdk (Rust) {NEW_VERSION}"
  13. Push the tag with git push origin cdp-sdk-rust@v{NEW_VERSION}
  14. Delete your release branch

Java

Follow these steps to publish a new version of the Java CDP SDK.

  1. Ensure you are on the main branch and have the latest changes
  2. Create a new branch for your changes, e.g. bump/java. The branch name doesn't matter, and you will delete this branch after the release
  3. Calculate the new version by looking at the files in the java/changelog.d folder:
    • If there is a file ending in removal.md, this is a major version bump
    • If there is a file ending in feature.md, this is a minor version bump
    • If there is a file ending in bugfix.md, this is a patch version bump
    • For example, if the current version is 1.0.0 and there is both a 123.feature.md and 456.bugfix.md, the new version will be 1.1.0
  4. Update the version number in java/build.gradle.kts (the version property) and java/README.md installation examples
  5. From the java folder, run git cliff --unreleased --tag v{NEW_VERSION} --prepend CHANGELOG.md to update the changelog
  6. Remove all files from java/changelog.d/ except .gitignore
  7. Add and commit all the changes with the message: chore(java): bump cdp-sdk to {NEW_VERSION}
  8. Push your branch, create a PR and get an approval
  9. Once approved, merge your PR
  10. Once merged, manually trigger the Publish cdp-sdk (Java) workflow
  11. Once the workflow has completed, go back to the main branch and pull the latest changes
  12. Tag the new version with git tag -s cdp-sdk-java@v{NEW_VERSION} -m "Release cdp-sdk (Java) {NEW_VERSION}"
  13. Push the tag with git push origin cdp-sdk-java@v{NEW_VERSION}
  14. Delete your release branch