Skip to content

Commit

Permalink
Merge branch 'one-3410-npm-publish' into 'main'
Browse files Browse the repository at this point in the history
ONE-3410: NPM publish to npmJS

See merge request procivis/one/one-react-native-components!142
  • Loading branch information
procivisAG committed Sep 18, 2024
2 parents 0b992fe + cd62152 commit 7676d67
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
18 changes: 16 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ stages:
rules:
- if: $CI_COMMIT_TAG

.only_manual_tag:
rules:
- if: $CI_COMMIT_TAG
when: manual

.only_main:
rules:
- if: $CI_COMMIT_REF_NAME == "main"
Expand Down Expand Up @@ -114,16 +119,25 @@ publish:storybook:
- .docker_publish
- .only_main

publish:npm:
publish:npm:private:
stage: deploy
script:
- npm config set @procivis:registry https://${CI_SERVER_HOST}/api/v4/npm/
- npm config set @procivis:registry https://${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/
- npm config set //${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken ${CI_JOB_TOKEN}
- npm publish --verbose --access restricted --tag stable
extends:
- .modules_setup
- .only_tag

publish:npm:public:
stage: deploy
script:
- npm config set //registry.npmjs.org/:_authToken ${NPMJS_TOKEN}
- npm publish --verbose --access public
extends:
- .modules_setup
- .only_manual_tag

deploy:storybook:
stage: deploy
needs:
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,6 @@
]
]
},
"publishConfig": {
"@procivis:registry": "https://gitlab.procivis.ch/api/v4/projects/101/packages/npm/"
},
"resolutions": {
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.cd77847.0"
}
Expand Down

0 comments on commit 7676d67

Please sign in to comment.