The tag check ignored a failed `git ls-remote` and continued as if the
tag did not exist, and it asked `origin`, which can differ from the
repository `gh` releases to.
Look the tag up with `gh api`, abort when that call fails, and accept
only a version of dot-separated numbers.
A 1.5.x release still moves `latest` on both registries. That is
harmless until 1.6 ships, so it is left for then.
The image build used the working tree as its context, so untracked files
such as `.ruby-lsp/` shipped in the registry.once.com image.
Extract `git archive` of `HEAD` once and build both the image and the
source ZIP from it. Say in the uncommitted-changes prompt that those
changes are not released.
The export image copied the working tree, so untracked files such as
`.ruby-lsp/` landed in the published ZIP.
Build it from `git archive` of `HEAD`, extracted to a directory so that
`.dockerignore` still applies.
`bin/release` let `gh release create` make the tag, and `gh` makes a
new tag at the head of the default branch. Running it on `release-1.5`
tagged `main` as v1.5.7, so the GitHub release and the GHCR images
shipped `main`.
Pass `HEAD` as `--target`, and abort when the tag already exists on
origin at a different commit.