Skip to content

Commit 0aa7b84

Browse files
Create README.md
1 parent 1e0414c commit 0aa7b84

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

stable/relese-to-NPM/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
The release-tonpm can be used to publish images to npm.
2+
The below pipeline configuration demonstrates simple usage:
3+
4+
deploy_to_npm:
5+
title: Publishing To Npm
6+
image: codefresh/release-tonpm:latest
7+
commands:
8+
- NPM_TOKEN=${{NPM_TOKEN}} npm run ci-publish
9+
when:
10+
branch:
11+
only: [ master ]
12+
13+
14+
Login into your project's NPM registry
15+
16+
npm login --registry <registry url>
17+
npm login --registry http://registry.npmjs.org
18+
19+
Copy the token
20+
The login step added a line to your ~/.npmrc file looking something like this
21+
22+
//registry.npmjs.org/:_authToken=00000000-0000-0000-0000-000000000000
23+
24+
Grab the auth token value 00000000-0000-0000-0000-000000000000 (older NPM proxies or registries like sinopia might have an older different token string format)
25+
26+
Set the token as CI environment variable
27+
Go to your CI project settings and add a new variable NPM_TOKEN with the value you have just copied

0 commit comments

Comments
 (0)