You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
12
12
* Added details of and procedures for resolving fully-qualified appIds and unqualified appIds in the API and Bridging Parts of the Standard. ([#1523](https://github.com/finos/FDC3/pull/1523))
13
13
* Added clarification regarding expected behavior upon repeated calls to `addContextListener` on same or overlapping types (allowed) and `addIntentListener` on same intent (rejected; new error type added). ([#1394](https://github.com/finos/FDC3/pull/1394))
14
14
* Added `clearContext` function and associated `contextClearedEvent` to the `Channel` API, to be able to clear specific or all context types from the channel. ([#1379](https://github.com/finos/FDC3/pull/1379))
15
+
* Added `version-check` script and integrated it into the `syncpack` script and Publish To NPM workflow to prevent version mismatches causing incorrect npm dist-tags. ([#1864](https://github.com/finos/FDC3/pull/1864))
15
16
16
17
### Changed
17
18
19
+
* Updated "Releasing FDC3 to NPM" instructions in README to reflect the current GitHub Actions release workflow. ([#1864](https://github.com/finos/FDC3/pull/1864))
Copy file name to clipboardExpand all lines: README.md
+20-28Lines changed: 20 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,52 +107,44 @@ For installation and usage instructions, see: <https://fdc3.finos.org/docs/suppo
107
107
108
108
### Releasing FDC3 to NPM (for maintainers)
109
109
110
-
This is a 4-step process:
110
+
Publishing to npm is handled automatically by the [Publish To NPM](.github/workflows/release.yml) GitHub Actions workflow, which is triggered when a GitHub Release is published. The workflow will lint, test and build the project, then publish all public workspace packages to both npmjs.org and GitHub Packages.
111
+
112
+
The npm dist-tag is determined by the version in the root `package.json`: versions containing a hyphen (e.g. `2.3.0-beta.1`) are published with the `prerelease` tag, while all other versions are published with the `latest` tag.
111
113
112
114
1.**Create a release branch**
113
115
114
-
Do this locally. Ensure the branch is named `release/v2.0` (or whatever the next version is).
115
-
116
116
```bash
117
-
git checkout -b release/v2.0
117
+
git checkout -b release/v2.3
118
118
```
119
-
120
-
2.**Update the version numbers in the package.json files**
121
119
122
-
It's important that all of the versions of the submodules stay on the same version, and that the references between them are consistent to that version. To change the version number (say before or after a release) run the following:
120
+
2.**Update version numbers**
121
+
122
+
All workspace versions and the root `package.json` version must match. Update them as follows:
123
123
124
124
```bash
125
-
// first, update version number in package.json
126
-
npm login
127
-
npm version <new version from package.json> --workspaces // changes the version number in all submodule package.json files
128
-
npm run syncpack // sycnhronizes version numbers
129
-
npm up // fixes node_module references
130
-
npm run build // builds all the modules against the new version
125
+
npm version <new-version> --include-workspace-root --workspaces
126
+
npm run syncpack # synchronizes @finos/* dependency versions and verifies consistency
127
+
npm up # fixes node_module references
128
+
npm run build # builds all modules against the new version
131
129
```
132
130
133
-
3.**Push the branch to publish the packages to npm**
131
+
The `syncpack` script will automatically run `version-check` to verify that the root version matches all public workspace versions. You can also run `npm run version-check` independently at any time.
132
+
133
+
3.**Push the branch and create a PR**
134
134
135
135
```bash
136
136
git add .
137
-
git commit -m "Updated to version vx.x"
138
-
git push origin release/v2.0
137
+
git commit -m "Updated to version v2.3.0"
138
+
git push origin release/v2.3
139
139
```
140
-
141
-
This should trigger a GitHub action that will publish the packages to npm.
142
-
143
-
4.**Create a PR for merging the release branch.**
144
140
145
-
Once the packages are published, create a PR to merge the release branch into the main branch. You will need other FDC3 maintainers to review and approve the PR.
141
+
Create a PR to merge the release branch into main. You will need other FDC3 maintainers to review and approve the PR.
146
142
147
-
5.**Reset the `latest` NPM Version Tag If Releasing A Prerelease**
143
+
4.**Create a GitHub Release to publish to npm**
148
144
149
-
If you're releasing beta/alpha code, be sure to replace the latest version in NPM like so:
150
-
151
-
```
152
-
npm dist-tag add @finos/fdc3@2.1.1 latest
153
-
```
145
+
Once the PR is merged, [create a new GitHub Release](https://github.com/finos/FDC3/releases/new) targeting the main branch. Publishing the release will trigger the workflow, which will publish all packages to npm and GitHub Packages.
154
146
155
-
You will need support from help@finos.org for this step.
147
+
The workflow also runs a version consistency check before publishing — if the root version doesn't match the workspace versions, the workflow will fail before any packages are published.
0 commit comments