From d7e0faa468cf73383d51b72201720d40bf112611 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Wed, 5 Mar 2025 09:31:46 -0500 Subject: [PATCH] stop publishing to npm registry with @latest on canary releases --- .github/workflows/node-sdk.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node-sdk.yml b/.github/workflows/node-sdk.yml index 65506125..6612e389 100644 --- a/.github/workflows/node-sdk.yml +++ b/.github/workflows/node-sdk.yml @@ -88,6 +88,13 @@ jobs: shell: bash run: | cd sdk/nodejs/sdk - npm publish --access public + # Check if this is the official repository + if [[ "${{ github.repository_owner }}" == "openziti" ]]; then + echo "Publishing from official repository with @latest tag" + npm publish --access public + else + echo "Publishing from fork/test repository with @canary tag" + npm publish --access public --tag canary + fi env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}