From ed275376378bd6db7c7e81831a98737e7dce5af0 Mon Sep 17 00:00:00 2001 From: Jan Loewe <jan.loewe@ptb.de> Date: Wed, 14 Jun 2023 11:20:55 +0200 Subject: [PATCH] fix(readme): update publishing guide to yarn --- .yarnrc.yml | 6 ++++++ README.md | 22 ++++++++-------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.yarnrc.yml b/.yarnrc.yml index 3186f3f..be07e74 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1 +1,7 @@ nodeLinker: node-modules + +npmPublishRegistry: "https://gitlab1.ptb.de/api/v4/projects/105/packages/npm/" + +npmScopes: + d-ptb: + npmRegistryServer: "https://gitlab1.ptb.de/api/v4/packages/npm/" diff --git a/README.md b/README.md index 6e78a92..68383fb 100644 --- a/README.md +++ b/README.md @@ -64,25 +64,19 @@ See [the Licence](LICENSE.md) for the specific language governing permissions an ## Publishing this package -Add the following to your `.npmrc`. -``` -message="chore(release): bump version to v%s" -# if you want to sign the tag -sign-git-tag=true - -@d-ptb:registry=https://gitlab1.ptb.de/api/v4/packages/npm/ - -# the following auth token should be a private one with write permission for the package registry -//gitlab1.ptb.de/api/v4/projects/:_authToken=<token> -//gitlab1.ptb.de/api/v4/packages/npm/:_authToken=<token> -//gitlab1.ptb.de/api/v4/projects/105/packages/npm/:_authToken=<token> +Add the following to your `.yarnrc.yml` in your **home folder**. Do not commit your token! +```yml +npmRegistries: + https://gitlab1.ptb.de/api/v4/projects/105/packages/npm/: + npmAlwaysAuth: true + npmAuthToken: "<token>" ``` ### Publishing workflow 1. Commit all changes -2. Bump the version with `npm version [major | minor | patch | ...]` +2. Bump the version with `yarn version [major | minor | patch | ...]` 3. Push all commits to the remote -4. Publish the package with `npm publish` +4. Publish the package with `yarn npm publish` -- GitLab