Skip to content
Open
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
26 changes: 26 additions & 0 deletions PUBLISH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Instructions for publishing a new SDK version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by publishing do we mean on GH or on a package distribution system? worth clarifying as we have learned from ccip-contracts etc that gh tagged versions may not map to NPM release versions etc as there may be github tagged versions that are not "ready" for NPM release.

Please can you update these instructions to distinguish between process for gh tagging vs release tagging.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. I added some clarifications, so people would know what to expect.


What this guide covers is how to publish a new SDK package on a package distribution network (where that applies), e.g.
[NPM](https://www.npmjs.com/package/@chainlink/data-streams-sdk) for TypeScript
or [crates.io](https://crates.io/crates/chainlink-data-streams-report) for Rust. As Go doesn't use a package system like
that, the release process is limited to tagging a commit and creating a GitHub release.

## Go

1. Tag a `main` commit with `go/vX.Y.X`. This is enough for the new version to be considered released.
2. Additionally, we can create a new release directly on GitHub. make sure to choose the correct tag, target, and
previous version/tag. That allows you to use the `Generate release notes` button to get a good starting point of the
release notes.

## TypeScript

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TS/NPM released also need the main branch to be tagged right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tagging main sounds like a good idea but it's not required - if you look at SDK v1.2.0, you can see it on NPM but there is no main tag for it.

If we decide to change the process and make that tag a requirement, then this doc will have to change but that's a separate conversation. My only goal with this PR is to describe the current release process, so people don't need to rely on word of mouth in order to get unblocked.

1. Increment the version in `package.json` to what it should be.
2. Run `npm i` in order to update `package-lock.json`.
3. Trigger the `Manual NPM Publish for TS SDK` GitHub action.

## Rust

1. Increment the version in all `Cargo.toml` files.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe show the example code snippets, for extra clarity? For example,

for https://crates.io/crates/chainlink-data-streams-report, update rust/crates/report/Cargo.toml file like this (for bump from 1.1.0 to 1.2.0)

[package]
name = "chainlink-data-streams-report"
- version = "1.1.0"
+ version = "1.2.0"

but for https://crates.io/crates/chainlink-data-streams-sdk (because it has report as a direct dependency), update rust/crates/sdk/Cargo.toml file like this (for bump from 1.1.0 to 1.2.0)

[package]
name = "chainlink-data-streams-sdk"
- version = "1.1.0"
+ version = "1.2.0"

.
.
.

[dependencies]
- chainlink-data-streams-report = { path = "../report", version = "1.1.0" }
+ chainlink-data-streams-report = { path = "../report", version = "1.2.0" }

2. Run `cargo build` and `cargo publish --dry-run` in order to update `Cargo.lock`.
3. Tag a `main` commit with `rust/chainlink-data-streams-report-vX.Y.Z`. This will trigger a GitHub action which will
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a) This will trigger a release of https://crates.io/crates/chainlink-data-streams-report crate only. After a new release of this crate gets published successfully, a new rust/chainlink-data-streams-sdk-vX.Y.Z github tag needs to be pushed to trigger the release of https://crates.io/crates/chainlink-data-streams-sdk crate
b) After tagging, an approval is needed for a Github action to be run

publish the two crates.