Liking cljdoc? Tell your friends :D

Maintainer Guide

Audience

You are a maintainer of this project.

Publishing a New Release

Is invoked from the command line via:

bb publish
To run validations without publishing, run bb pubcheck
To validate without pushing an actual release, use bb publish --no-push. Output will instruct you on how to undo the git tag and commits.
To skip the confirmation prompt: bb publish --yes.

The publish task locally validates:

  • local git

    • you are not on a fork

    • you are on the default branch

    • do not have any uncommitted code

    • do not have any unpushed commits

    • local head sha matches matches remote head sha

  • changelog

    • Has an "Unreleased" section with content

Then also locally:

  1. unSNAPSHOT version (our scheme is major.minor.<release count>)

    • Our version is stored in deps.edn under :aliases :neil :project :version

  2. applies version to:

    1. doc/01-user-guide.adoc

    2. CHANGELOG.adoc

  3. git commit: deps.edn doc/01-user-guide.adoc CHANGELOG.adoc

  4. git tag with release tag v<version>

  5. prep for ongoing dev work after release:

    1. add new Unreleased section to CHANGELOG.adoc

    2. bump <release count> & SNAPSHOT version stored in deps.edn

    3. git commits these files

  6. push new commits

  7. push version tag

Then up on CI, the CI publish workflow is only triggered when it sees a release tag:

  1. CI tests workflow is invoked

  2. a release jar is published to clojars

  3. a GitHub release is created

  4. cljdoc is informed of the new release

Relevant Sources

Sources:

  1. bb.edn - tasks entry point

  2. deps.edn - we store project info (incuding version) under :aliases → :neil → :project

  3. script/build_config.clj - build configuration

  4. script/publish.clj - client side work

  5. script/ci_publish.clj - ci side work

CI - We use GitHub Actions for this project

  1. .github/workflows/publish.yml

CI Config

Clojars secrets are protected under the publish environment which is only referenced by publish.yml.

Expected Oddities

When publishing, you will see both the tests workflow triggered and the publish workflow triggered (which also invokes the tests workflow).

This extra running of the tests workflow is GitHub Actions responding to changes committed as part of the publishing work. Annoying, but harmless.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close