Skip to content

Commit 3667fe5

Browse files
Update README.md
1 parent 0aa7b84 commit 3667fe5

File tree

1 file changed

+30
-19
lines changed

1 file changed

+30
-19
lines changed

stable/relese-to-NPM/README.md

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
1+
README
2+
13
The release-tonpm can be used to publish images to npm.
24
The below pipeline configuration demonstrates simple usage:
35

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
6+
deploy_to_npm:
7+
8+
title: Publishing To Npm
9+
image: codefresh/npm-publish:master
10+
commands:
11+
- NPM_TOKEN=${{NPM_TOKEN}} npm run ci-publish
12+
when:
13+
branch:
14+
only: [ master ]
15+
16+
17+
Parameter Reference
18+
19+
-NPM_TOKEN
20+
21+
-npm access key
22+
23+
24+
25+
Login into your project's NPM registry
1526

16-
npm login --registry <registry url>
17-
npm login --registry http://registry.npmjs.org
27+
npm login --registry <registry url>
28+
npm login --registry http://registry.npmjs.org
1829

19-
Copy the token
20-
The login step added a line to your ~/.npmrc file looking something like this
30+
Copy the token
31+
The login step added a line to your ~/.npmrc file looking something like this
2132

22-
//registry.npmjs.org/:_authToken=00000000-0000-0000-0000-000000000000
33+
//registry.npmjs.org/:_authToken=00000000-0000-0000-0000-000000000000
2334

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)
35+
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)
2536

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
37+
Set the token as CI environment variable
38+
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)