A tool to ease contributions to opam repositories.
opam-publish takes package definition files of your projects, and submits
them to opam package repositories
(ocaml/opam-repository by default).
This version is for opam 2.0.0, and should not be used with repositories in older formats. A Github account is required. opam repository is cloned over ssh, you need to have your ssh keys registered in your Github account.
Basic case, assuming your project is on Github
The same works for initial publications, new releases, and updates.
The following should be run from the source directory of your project
- Make sure you have an
NAME.opamfiles at the root of your project
- Create a tag:
git tag -a TAG; git push origin TAG
opam publish. This will install the tool if required.
You will be guided through the rest (creating a Github token the first time, reviewing the patch, etc.)
If your project is not on Github, you can specify the archive URL on the command-line.
If the opam files are not in the archive, or outdated, you can specify them
on the command-line, or specify a directory where to look for them (e.g.
opam publish URL .).
Submitting to other repositories is possible, as long as they are on Github.
Updating already published packages is also allowed (as long as they don't
opam publish --help for more options.