diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 82f35c037c6e70a4fefbbb8e884f8e8f14162bce..514ee8138b4e08836dc1a678410aa0a84f27ea2b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -51,10 +51,10 @@ Publish npm:
   only:
     - tags@ghsc/nshmp/disagg-d3
   before_script:
+    - echo '//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}'>.npmrc
     - npm ci
     - git config user.email "${GITLAB_USER_EMAIL}"
     - git config user.name "${GITLAB_USER_NAME}"
-    - echo '//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}'>.npmrc
   script:
     - npx standard-version --release-as ${CI_COMMIT_TAG} --skip.commit --skip.changelog
     - npm publish --access public