Skip to content

Commit 30763e2

Browse files
agneumSarumyan
authored andcommitted
fix(ci): publish shared prerelease packages under a channel dist-tag
1 parent ce4b40b commit 30763e2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

ui/packages/shared/.gitlab-ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ publish-shared-release:
7474
- npm version "$VERSION" --no-git-tag-version --allow-same-version
7575
- pnpm run pack
7676

77-
# Publish
77+
# Publish: stable releases go to the "latest" dist-tag, prereleases (e.g. 4.2.0-rc.1)
78+
# go to a channel dist-tag matching their identifier (rc/beta/alpha), since npm refuses
79+
# to publish a prerelease version to "latest" without an explicit --tag.
7880
- TARBALL=$(ls postgres.ai-shared-*.tgz)
79-
- pnpm publish "$TARBALL" --no-git-checks
81+
- DIST_TAG=latest
82+
- case "$VERSION" in *-*) PRERELEASE=${VERSION#*-}; DIST_TAG=${PRERELEASE%%.*} ;; esac
83+
- pnpm publish "$TARBALL" --no-git-checks --tag "$DIST_TAG"

0 commit comments

Comments
 (0)