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

Release process #2702

Open
davesnx opened this issue Mar 24, 2023 · 0 comments
Open

Release process #2702

davesnx opened this issue Mar 24, 2023 · 0 comments
Labels
Housecleaning RFC For larger proposals/ideas that will need discussion

Comments

@davesnx
Copy link
Member

davesnx commented Mar 24, 2023

Currently, the release process has a few issues, the root is that it is done manually, so some steps might be skipped which results in problems:

  • npm's published version hasn't been updated in 2 years. It's stuck at 3.7.0 https://www.npmjs.com/package/@esy-ocaml/reason while 3.8.2 has been out since Oct 15, 2022
  • versions numbers are un-sync everywhere, since refmt --version often lies (is going away on Fix version on refmt #2701), bs-platform shipping with a packaged refmt for 3.6.2 makes stuff more confusing as well.
  • The only way to use a "nightly" release of Reason, you need to pin which is a sub-par experience when Reason is as a transitive dependency.
  • We manually check if an entry to CHANGELOG is added (instead of a tool checking it for us)
  • Most scripts (opam-release, release-check and test-with-version) are probably unused, wrong and rely on personal GH tokens.

Opening this issue as gathering information to fix it and if it's worth the effort. There have been a few issues in the past: #2418 #2461 #2453

Proposed solution

GH actions should handle all release processes, publish to npm and open the PR to opam-repository.

version=X.X.X make pre_release

This should do everything for you:

  • Update accordingly version everywhere: esy.json, reason.json, rtop.json and dune-project
  • Create a git tag
  • Create a commit message
  • Push to origin with tags

The CI should handle:

  • Running node ./scripts/esy-prepublish.js

  • cd _release/XXX/package/

  • npm publish --access=public

  • Running opam-publish

Notes: We can't use %%VERSION%% and dune subts in esy.json files since esy doesn't recognise %%VERSION%% as a valid one. We would need to do something less fancy:

@echo "Updating packages with version: $(version)"
@sed -i '' 's/(version .*)/(version $(version))/' dune-project
@sed -i '' 's/"version": .*"/"version": '\"$(version)\"'/g' esy.json
@sed -i '' 's/"version": .*"/"version": '\"$(version)\"'/g' reason.json
@sed -i '' 's/"version": .*"/"version": '\"$(version)\"'/g' rtop.json
@davesnx davesnx added Housecleaning RFC For larger proposals/ideas that will need discussion labels Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Housecleaning RFC For larger proposals/ideas that will need discussion
Projects
None yet
Development

No branches or pull requests

1 participant