fix(ci): publish shared prerelease packages under a channel dist-tag

Problem

The publish-shared-release job runs pnpm publish "$TARBALL" --no-git-checks with no --tag, so npm targets the latest dist-tag. npm refuses to publish a prerelease version to latest without an explicit --tag, so @postgres.ai/shared fails to publish on every -rc/-beta tag (observed on v4.2.0-rc.1). The job is allow_failure: true, so the pipeline stays green while the shared package silently isn't published.

Fix

Derive the npm dist-tag from the version:

  • Stable releases (4.2.0) → latest (unchanged behavior).
  • Prereleases (4.2.0-rc.1, 4.2.0-beta.3) → the prerelease identifier (rc, beta, alpha).

This also keeps prereleases off latest, so npm install @postgres.ai/shared continues to resolve the last stable release.

Closes #732 (closed)

Edited by Artyom Kartasov

Merge request reports

Loading
Loading