mix nbpr.publish (NBPR v0.2.1)

Copy Markdown View Source

Uploads a tarball produced by mix nbpr.pack to the first supported backend declared in the package's artifact_sites:.

mix nbpr.publish <Module> <path-to-tarball>

e.g.

mix nbpr.publish NBPR.Jq /path/to/nbpr_jq-1.7.1-...-cb13a42462c2806d.tar.gz

Backends

  • {:ghcr, "ghcr.io/<owner>"} — pushes a pure-Elixir OCI artefact to ghcr.io/<owner>/<package>:<tag>. Requires GHCR_TOKEN or GITHUB_TOKEN in the environment (with write:packages scope).
  • {:github_releases, "<owner>/<repo>"} — uploads via gh release to tag <package>-v<package-version>, creating the release if needed. Requires gh on PATH and authenticated.

Sites are tried in artifact_sites order; the first site whose backend has the required CLI installed is used.

Flags

  • --draft — only applies to github_releases; creates the release as a draft on first creation.
  • --prerelease — only applies to github_releases; marks the release as a prerelease on first creation.
  • --force — only applies to ghcr; re-pushes even when the tag is already published. By default, nbpr.publish checks GHCR for the tag and skips re-pushing — NBPR's cache-key model treats published tarballs as immutable, so re-pushing the same tag is wasted work in CI.