Thoughts
- Version bumping is time consuming and feels automateable.
- The steps before it (test, build, lint) should be run in the CI - also when releasing.
- Releases span JS (npm) and RUST (cargo) repositories. Ideally, both are automated.
- Manual changelog editing is proven to be error-prone. Let's get rid of it. Conventional Commits seems like a better paradigm.
- Version bumps require commit, so probably require an automated PR - or we need a CLI that also commits. In any case, we can't have the CI bumping code without a PR.
Right now releasing a new version is too much manual work:
In browser
pnpm lint-fix
- commit any changes (if they are there)
pnpm build to build typescript files (don't skip this!)
- make sure
atomic-server is running on localhost.
pnpm test
pnpm test-e2e
- Update the
package.json files for lib, rust, and data-browser with a new version number. Match the version number with atomic-data-rust
- Check the changelog, make sure the headers are correct
- Now do the rust libraries
- Commit any changes, name it
vX.XX.XX
pnpm publish -r
- Choose a new version. Versions should match
atomic-data-rs.
- This updates the
package.json files, creates a commit, tags it, pushes it to github, and publishes the builds to npm.
- If this fails, try
pnpm version patch and pnpm publish
- DONT run
pnpm npm publish, as it will not resolve workspace dependencies correctly.
In the rust crates
- Commit changes
- Make sure all tests run properly
- Test, build and update the
/browser versions (package.json files, see ./browser/contributing.md)
- Use
cargo workspaces version patch --no-git-commit (and maybe replace patch with the minor) to update all cargo.toml files in one command. You'll need to cargo install cargo-workspaces if this command is not possible.
- Publish to cargo:
cargo publish. First lib, then cli and server.
- Publish to
npm (see browser/contribute.md)
- Update the
CHANGELOG.md files (browser and root)
Solutions
cargo-release automates bumping versions and publishing. I used it some time ago, for somereason removed it from the docs. I recall having some issues with it.
release-plz, which creates PRs for releases. Written in rust, supports only rust.
release-please, does the same, typescript, by google. Supports rust workspaces with a plugin, but also supports pnpm.
Thoughts
Right now releasing a new version is too much manual work:
In
browserpnpm lint-fixpnpm buildto build typescript files (don't skip this!)atomic-serveris running onlocalhost.pnpm testpnpm test-e2epackage.jsonfiles forlib,rust, anddata-browserwith a new version number. Match the version number withatomic-data-rustvX.XX.XXpnpm publish -ratomic-data-rs.package.jsonfiles, creates a commit, tags it, pushes it to github, and publishes the builds to npm.pnpm version patchandpnpm publishpnpm npm publish, as it will not resolve workspace dependencies correctly.In the rust crates
/browserversions (package.jsonfiles, see./browser/contributing.md)cargo workspaces version patch --no-git-commit(and maybe replacepatchwith theminor) to update allcargo.tomlfiles in one command. You'll need tocargo install cargo-workspacesif this command is not possible.cargo publish. Firstlib, thencliandserver.npm(seebrowser/contribute.md)CHANGELOG.mdfiles (browser and root)Solutions
cargo-releaseautomates bumping versions and publishing. I used it some time ago, for somereason removed it from the docs. I recall having some issues with it.release-plz, which creates PRs for releases. Written in rust, supports only rust.release-please, does the same, typescript, by google. Supports rust workspaces with a plugin, but also supports pnpm.