Skip to content
Snippets Groups Projects
Commit 7f9460c1 authored by Dean Lovett's avatar Dean Lovett
Browse files

Merge branch '1-add-npm-publish-script' into 'master'

Add npm publish script

Closes #1

See merge request !1
parents 376b12de 3990602b
No related branches found
No related tags found
1 merge request!1Add npm publish script
Pipeline #8032 passed
......@@ -3,4 +3,5 @@ test-shellcheck:
image: koalaman/shellcheck-alpine
needs: []
script:
- shellcheck src/release.sh
\ No newline at end of file
- shellcheck src/release.sh
- shellcheck src/npm-publish.sh
\ No newline at end of file
#!/bin/bash -e
echo "Setting publish config for scope '@$CI_PROJECT_ROOT_NAMESPACE', project id '$CI_PROJECT_ID'"
npm config set "@$CI_PROJECT_ROOT_NAMESPACE:registry" "$CI_SERVER_URL/api/v4/packages/npm"
npm config set "//$CI_SERVER_HOST/api/v4/packages/npm/:_authToken" "$CI_JOB_TOKEN"
npm config set "//$CI_SERVER_HOST/api/v4/projects/$CI_PROJECT_ID/packages/npm/:_authToken" "$CI_JOB_TOKEN"
echo "Publishing package '@$CI_PROJECT_ROOT_NAMESPACE/$CI_PROJECT_NAME' to internal package registry"
npm publish
echo "Done!"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment