Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,19 @@ jobs:
- name: Publish to NPM
if: startsWith(github.ref, 'refs/tags/') # Only on tags
run: |
npm run lerna -- version ${{ steps.get_version.outputs.RELEASE_VERSION }} --no-git-tag-version --exact -y &&
pushd packages/couchbase-index-manager && npm publish --access public && popd &&
pushd packages/couchbase-index-manager-cli && npm publish --access public&& popd
VERSION="${{ steps.get_version.outputs.RELEASE_VERSION }}"
# Determine npm tag based on version
if [[ $VERSION == *"-"* ]]; then
# Extract prerelease identifier (e.g., "beta" from "2.2.0-beta0002")
PRERELEASE="${VERSION#*-}"
TAG=$(echo "$PRERELEASE" | sed 's/[0-9]*$//')
else
TAG="latest"
fi

npm run lerna -- version $VERSION --no-git-tag-version --exact -y &&
pushd packages/couchbase-index-manager && npm publish --access public --tag $TAG && popd &&
pushd packages/couchbase-index-manager-cli && npm publish --access public --tag $TAG && popd
env:
NPM_CONFIG_PROVENANCE: true

Expand Down