Skip to content

Commit 2ea21e3

Browse files
authored
Add instructions on publishing a new SDK version. (#53)
1 parent b993021 commit 2ea21e3

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

PUBLISH.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Instructions for publishing a new SDK version
2+
3+
What this guide covers is how to publish a new SDK package on a package distribution network (where that applies), e.g.
4+
[NPM](https://www.npmjs.com/package/@chainlink/data-streams-sdk) for TypeScript
5+
or [crates.io](https://crates.io/crates/chainlink-data-streams-report) for Rust. As Go doesn't use a package system like
6+
that, the release process is limited to tagging a commit and creating a GitHub release.
7+
8+
## Go
9+
10+
1. Tag a `main` commit with `go/vX.Y.X`. This is enough for the new version to be considered released.
11+
2. Additionally, we can create a new release directly on GitHub. make sure to choose the correct tag, target, and
12+
previous version/tag. That allows you to use the `Generate release notes` button to get a good starting point of the
13+
release notes.
14+
15+
## TypeScript
16+
17+
1. Increment the version in `package.json` to what it should be.
18+
2. Run `npm i` in order to update `package-lock.json`.
19+
3. Trigger the `Manual NPM Publish for TS SDK` GitHub action.
20+
21+
## Rust
22+
23+
1. Increment the version in all `Cargo.toml` files:
24+
25+
rust/crates/report/Cargo.toml:
26+
27+
```
28+
[package]
29+
name = "chainlink-data-streams-report"
30+
- version = "1.1.0"
31+
+ version = "1.2.0"
32+
```
33+
34+
rust/crates/sdk/Cargo.toml:
35+
36+
```
37+
[package]
38+
name = "chainlink-data-streams-sdk"
39+
- version = "1.1.0"
40+
+ version = "1.2.0"
41+
42+
...
43+
44+
[dependencies]
45+
- chainlink-data-streams-report = { path = "../report", version = "1.1.0" }
46+
+ chainlink-data-streams-report = { path = "../report", version = "1.2.0" }
47+
```
48+
49+
2. Run `cargo build` and `cargo publish --dry-run` in order to update `Cargo.lock`.
50+
3. Trigger the `Publish Chainlink Data Streams Report Crate` and `Publish Chainlink Data Streams SDK Crate` GitHub
51+
actions by pushing the respective `rust/chainlink-data-streams-report-v*` and `rust/chainlink-data-streams-sdk-v*`
52+
tags.

0 commit comments

Comments
 (0)