Skip to content

Publishing Releases

Nils Homer edited this page Jul 16, 2024 · 15 revisions

Publishing to Sonatype

Requirements

Set up GPG and your Sonatype Credentials

Set up an access token at https://central.sonatype.org/publish/generate-token/ to use with the username and password below.

The simplest way to setup your Sonatype credentials before doing a release is just:

export SONATYPE_USER=...
export SONATYPE_PASS=xxx

You may need to run the following before using GPG:

export GPG_TTY=$(tty)

Perform the release

(1) Remove the snapshot version and perform a commit.

(2) Verify that all dependencies are on a release version, in particular dagr.

(3) Perform the release

sbt +publishSigned
sbt sonatypeRelease

(4) Bump the version number and add -SNAPSHOT. Do so for any dependencies which we want to use the snapshot version, in particular dagr.

Please note that sbt sonatypeRelease does the following:

sbt sonatypeClose
sbt sonatypePromote

(5) Add a release on github: https://github.com/fulcrumgenomics/fgbio/releases

Make sure to run sbt assembly and add the release-version assembly-JAR (ex. fgbio-x.y.z.jar) to the release.

(6) Update Bioconda

Bioconda should auto-detect version changes.

(7) Update GitHub Pages site (see below)

Update Documentation on the GitHub Pages site

  1. Run the run_metrics_doclet.sh script to generate target/metrics.md
  2. Run java -cp target/scala-2.13/fgbio-{version}.jar com.fulcrumgenomics.internal.InternalTools BuildToolDocs -o /tmp/docs.{version}
  3. Checkout the gh-pages branch of the repository and make sure it's up-to-date (i.e git checkout -b gh-pages origin/gh-pages && git pull --ff-only origin gh-pages)
  4. Copy target/metrics.md to metrics/{version}/index.md (you will need to mkdir metrics/{version})
  5. Copy (recursively) /tmp/docs.{version} to tools/{version}
  6. In each of the tools and metrics directories delete the latest symlink and re-create it using a relative link to the new version. E.g. cd tools && rm latest && ln -s {version} latest && cd ...
  7. Add the new files to git. E.g. git add tools/{version} mertrics/{version}.
  8. Edit the index.md file to change the JAR version (ex. 0.1.4 to 0.2.0).
  9. Commit the changes to the documentation and git push the gh-pages branch.