reasonml / reason

Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems
http://reasonml.github.io
MIT License
10.14k stars 428 forks source link

Release process #2702

Closed davesnx closed 2 months ago

davesnx commented 1 year ago

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:

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: https://github.com/reasonml/reason/issues/2418 https://github.com/reasonml/reason/issues/2461 https://github.com/reasonml/reason/issues/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:

The CI should handle:

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
anmonteiro commented 2 months ago

@davesnx we should simplify this:

what do you thinK?

davesnx commented 2 months ago

I'm happy with the current workflow of opam and github releases. Esy users can still benefit with @opam/reason, so it's good.

I'm still annoyed by legacy versions on npm, and some scripts in makefile, I might cleanup those.