Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve flow for bumping, publishing, releasing #957

Open
joepio opened this issue Aug 27, 2024 · 2 comments · May be fixed by #961
Open

Improve flow for bumping, publishing, releasing #957

joepio opened this issue Aug 27, 2024 · 2 comments · May be fixed by #961
Assignees
Labels
ci Github actions / e2e tests / build / etc

Comments

@joepio
Copy link
Member

joepio commented Aug 27, 2024

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

  1. Commit changes
  2. Make sure all tests run properly
  3. Test, build and update the /browser versions (package.json files, see ./browser/contributing.md)
  4. 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.
  5. Publish to cargo: cargo publish. First lib, then cli and server.
  6. Publish to npm (see browser/contribute.md)
  7. 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.
joepio added a commit that referenced this issue Aug 27, 2024
joepio added a commit that referenced this issue Aug 27, 2024
@joepio
Copy link
Member Author

joepio commented Aug 27, 2024

release-plz

  • Only supports Rust, which could be too much of a problem
  • @AlexMikhalev had some experience with this, it apparently creates commits that contains the build outputs... That would be a complete dealbreaker.

https://github.com/atomicdata-dev/atomic-server/actions/runs/10579544307/job/29312265327#step:4:412

issues so far

  • GitHub Actions is not permitted to create or approve pull requests

@joepio joepio self-assigned this Aug 27, 2024
@joepio joepio added the ci Github actions / e2e tests / build / etc label Aug 27, 2024
@joepio joepio linked a pull request Sep 9, 2024 that will close this issue
3 tasks
@joepio
Copy link
Member Author

joepio commented Sep 10, 2024

Release-please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Github actions / e2e tests / build / etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant