|
| 1 | +# lnc-core Release Process |
| 2 | + |
| 3 | +This document describes the steps needed to release a new version of |
| 4 | +`@lightninglabs/lnc-core` and publish the package to the NPM registry. |
| 5 | + |
| 6 | +The steps below for Bumping proto versions and Versioning should be done in |
| 7 | +a PR with proper review. |
| 8 | + |
| 9 | +## Bumping proto versions |
| 10 | + |
| 11 | +When new versions of LND, Loop, Pool, Faraday, or Lightning Terminal are |
| 12 | +released, we should update the generated types in this package to match the |
| 13 | +latest versions. Just make sure that the versions listed here also match the |
| 14 | +versions that the `lightning-node-connect` release was built with. You can check |
| 15 | +the `go.mod` files for |
| 16 | +[wasm-client](https://github.com/lightninglabs/lightning-node-connect/blob/master/cmd/wasm-client/go.mod) |
| 17 | +and |
| 18 | +[mobile](https://github.com/lightninglabs/lightning-node-connect/blob/master/mobile/go.mod). |
| 19 | + |
| 20 | +Specify the new versions the `config` section in the |
| 21 | +[package.json](https://github.com/lightninglabs/lnc-core/blob/9d31f49dd9cacab1e7cb1d5664074fd554f42897/package.json#L7) |
| 22 | +file. |
| 23 | + |
| 24 | +```json |
| 25 | + "config": { |
| 26 | + "lnd_release_tag": "v0.16.0-beta", |
| 27 | + "loop_release_tag": "v0.22.0-beta", |
| 28 | + "pool_release_tag": "v0.6.2-beta", |
| 29 | + "faraday_release_tag": "v0.2.9-alpha", |
| 30 | + "lit_release_tag": "v0.9.0-alpha", |
| 31 | + "protoc_version": "21.9" |
| 32 | + }, |
| 33 | +``` |
| 34 | + |
| 35 | +After specifying the latest versions, run the following commands in the root |
| 36 | +dir of the project. |
| 37 | + |
| 38 | +```sh |
| 39 | +# download new proto files |
| 40 | +yarn run update-protos |
| 41 | +# generate Typescript definitions from the updated protos |
| 42 | +yarn run generate |
| 43 | +``` |
| 44 | + |
| 45 | +## Versioning |
| 46 | + |
| 47 | +We typically try to keep the version of `lnc-core` in sync with the version |
| 48 | +number of [lightning-node-connect](https://github.com/lightninglabs/lightning-node-connect). |
| 49 | +If we need to bump the version of `lnc-core` without requiring a new version of |
| 50 | +`lightning-node-connect`, we should append an incrementing number to the end of |
| 51 | +the version. For example, |
| 52 | +[v0.1.11-alpha.1](https://github.com/lightninglabs/lnc-web/releases/tag/v0.1.11-alpha.1). |
| 53 | + |
| 54 | +Increment the version number in the |
| 55 | +[package.json](https://github.com/lightninglabs/lnc-core/blob/9d31f49dd9cacab1e7cb1d5664074fd554f42897/package.json#L3) |
| 56 | +file. |
| 57 | + |
| 58 | +## Publishing to NPM |
| 59 | + |
| 60 | +Building and publishing the this package to NPM is handled automatically by |
| 61 | +the [npm.yml](https://github.com/lightninglabs/lnc-core/blob/e136a4ee9295279acb0ae309327e19e6a59b39aa/.github/workflows/npm.yml#L1) |
| 62 | +Github workflow. This is triggered when a new release is created. |
| 63 | + |
| 64 | +## Github Release |
| 65 | + |
| 66 | +[Draft a new release](https://github.com/lightninglabs/lnc-core/releases/new) |
| 67 | +on Github. Create a new tag and auto-generate the release notes. You do not |
| 68 | +need to include any assets. |
| 69 | + |
| 70 | +Once you publish the release, the build and publish to NPM will complete in |
| 71 | +a few minutes. You can confirm the new version is published by visiting |
| 72 | +https://www.npmjs.com/package/@lightninglabs/lnc-core |
0 commit comments