and i just did that for 0.30...

How to release a new ott version to the opam repository

in ott repository
1) put ott into a good state, test all the things locally
2) adjust revision_history.txt to reflect the current state
3) in src/Makefile, set OTTVER to reflect the next release ($VERSION)
4) date > src/tmp_date.txt
5) make clean && make (creates a fresh version.ml!)
6) Update the version number in ott.opam
7) once happy with that, commit and push
8) cd doc && make && make install-top2-built (this generates a top2.pdf and
   copies it to built_doc)

- someone with access to the ott homepage should cd doc and run "make install-web-files" then cd src and "make install-www-index"

on GitHub
9) on https://github.com/ott-lang/ott/releases click "Draft a new release"
   button in the upper right corner (enter again version number, optional
   title and changes)
10) this generated a git tag on GitHub, and a tarball

in opam-repository git repository
11) cd to clone of https://github.com/ocaml/opam-repository.git

 once:
 a) also needs a fork where you have write access
    on https://github.com/ocaml/opam-repository/ upper right corner "fork"
 b) git remote add mine https://github.com/PeterSewell/opam-repository.git

 later:
 a) git checkout master
 b) git pull

12) git checkout -b ott.$VERSION
13) cd opam-repository/packages/ott ; mkdir ott.$VERSION
14) cp /path/to/ott/opam ott.$VERSION/opam
14b) edit the opam file to remove the version field (otherwise opam CI
will complain)
15) for sanity, do a diff between ott.$LATEST/opam and ott.$VERSION/opam
16) curl -Lo /tmp/ott.tar.gz https://github.com/ott-lang/ott/archive/$VERSION.tar.gz
17) take checksum from `sha512` (or `sha512sum` or `openssl sha512q) /tmp/ott.tar.gz
18) add in ott.$VERSION/opam the archive location and checksum:
  url {
    src: "https://github.com/ott-lang/ott/archive/$VERSION.tar.gz"
    checksum: "sha512=bd83649b6ec5a4dbc22ed0de6a3a81f4"
  }
19) git add ott.$VERSION; git commit -m "ott $VERSION"; git push mine ott.$VERSION
20) at https://github.com/ocaml/opam-repository/ click on "New pull request",
    "compare across forks", and select <my-github-user>/opam-repository as HEAD
21) done.  now a CI system and maintainers will care about the new release,
    and may suggest enhancements to the opam file (best to be done in the ott
    repository as well)

There's also a coq-ott package that goes into the Coq opam repository.
It's probably the same procedure, but Karl Palmskog has been doing it.
