Skip to content
Snippets Groups Projects
Commit 9699dc82 authored by Corentin Méhat's avatar Corentin Méhat
Browse files

Update .gitlab-ci.yml file

parent 33e15b19
Branches
Tags
No related merge requests found
Pipeline #748904599 failed
......@@ -77,16 +77,16 @@ publish gitlab:
- npm config set @${CI_PROJECT_ROOT_NAMESPACE}:registry ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/npm/
- npm config set -- '//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken' "${CI_JOB_TOKEN}"
- npm config list
- npm publish
# # # Compare the version in package.json to all published versions (ko with gitlab so far)
# # # If the package.json version has not yet been published, run `npm publish`.
# - |
# if [[ "$(npm view ${NPM_PACKAGE_NAME} versions)" != *"'${NPM_PACKAGE_VERSION}'"* ]]; then
# npm publish
# echo "Successfully published version ${NPM_PACKAGE_VERSION} of ${NPM_PACKAGE_NAME} to GitLab's NPM registry: ${CI_PROJECT_URL}/-/packages"
# else
# echo "Version ${NPM_PACKAGE_VERSION} of ${NPM_PACKAGE_NAME} has already been published, so no new version has been published."
# fi
# - npm publish
# # Compare the version in package.json to all published versions (ko with gitlab so far)
# # If the package.json version has not yet been published, run `npm publish`.
- |
if [[ "$(npm view ${NPM_PACKAGE_NAME} versions)" != *"'${NPM_PACKAGE_VERSION}'"* ]]; then
npm publish
echo "Successfully published version ${NPM_PACKAGE_VERSION} of ${NPM_PACKAGE_NAME} to GitLab's NPM registry: ${CI_PROJECT_URL}/-/packages"
else
echo "Version ${NPM_PACKAGE_VERSION} of ${NPM_PACKAGE_NAME} has already been published, so no new version has been published."
fi
publish npm:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment