Publish MCP package; improve publishing ergonomics#2
Conversation
| "changeset": "changeset", | ||
| "changeset:version": "changeset version", | ||
| "release:plugin": "pnpm --filter @formio/ai publish --no-git-checks" | ||
| "release:get-tag": "node -p \"require('fs').existsSync('.changeset/pre.json')?require('./.changeset/pre.json').tag:'latest'\"", |
There was a problem hiding this comment.
This will default to latest if pre.json does not exist. This file is managed by changeset CLI commands.
https://github.com/changesets/changesets/blob/main/docs/prereleases.md
There was a problem hiding this comment.
I tried using changeset publish, which handles this automatically, but it didn't handle the pnpm scripts in the plugin package, so I opted for pnpm publish instead along with this workaround to auto-load the rc tag.
|
Worth noting that npm adds the latest tag (at least when I was testing with verdaccio) on the initial publish, even if you use the Starts with notice output of |
| '@formio/ai': major | ||
| --- | ||
|
|
||
| Initial 1.0 release candidate. |
There was a problem hiding this comment.
Initial release will be a beta
There was a problem hiding this comment.
I've set both package versions to 0.1.0. We can do a manual publish for now and then when the next changeset comes through it should trigger the version creation/publishing automation. Alternatively, could bump the versions back manually to 0.0.0 and then make a changeset file for 0.1.0 to trigger automation.
549fb39 to
f943b38
Compare
This PR includes the following changes:
prepublishOnlyscripts for both packages that build and test each package before publishingrelease:get-tag) to check for existence of .changeset/.pre.json file to get prerelease (rc) tag (I tried usingchangeset publish, which handles this automatically, but it didn't handle thepnpmscripts in the plugin package, so I opted forpnpm publishinstead)*1.0.0-rc.0for both packages– after this PR is merged,release.ymlshould create a subsequent version PR, which should publish to NPM on merge*For pre-release versions, we'll use 0.x, and only use the rc tag after the release of 1.x. Since this PR deletes the pre.json file, the rc tag will not be included in the npm publish command