The existing-version check listed the bucket with an anonymous curl, but
Backblaze B2 requires authentication for the list-bucket API, so it returned
AccessDenied and r-versions-existing.txt was always empty -> every version
was rebuilt despite already existing in s3. Signing the request is not
workable here: the B2 credentials are scoped to the plugin-s3 image in crow
and are not injected into this plain alpine step.
Individual artifacts are public-read, so probe each expected object URL with
an anonymous HEAD instead. The filename mirrors what nfpm produces (version
and release pinned to 1): r-<ver>_1_<arch>.{apk,deb} for alpine/ubuntu and
R-<ver>-1-1.<arch>.rpm for el*. Verified against the live bucket for all
three packager families.
Shell variables use bare $name rather than ${name}: crow runs its own
${VAR} substitution over the commands before the shell executes, so a
${VAR} naming a shell var (BASE, VERSION) was blanked to empty -- only
matrix vars resolve at that stage. Build the filename with printf to avoid
the ${VERSION}_1 brace requirement entirely.