olegkruchay-sync
Version:
Reusable components for [olegkruchay.com] and [hub.olegkruchay.com] projects.
44 lines (32 loc) • 1.69 kB
Markdown
"https://olegkruchay.com" title="The NEW olegkruchay.com web-site">
<img src="https://olegkruchay.com/static/public/promo-olegkruchay-com.gif" alt="The NEW olegkruchay.com web-site" />
</a>
1. Generate a github `TOKEN_ID` with the special rules `repo, workflow, write:packages`
[ ](https://docs.github.com/en/free-pro-team@latest/packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages#publishing-multiple-packages-to-the-same-repository)
2. Login to github packages
```bash
$ npm login --registry=https://npm.pkg.github.com
```
3. Create a local file `.npmrc`
```
@USER_NAME:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=TOKEN_ID
```
4. Add the following lines into `package.json` file
```json
"name": "@USER_NAME/PROJECT_NAME",
"publishConfig": {
"registry": "https://npm.pkg.github.com/@USER_NAME/"
},
"repository" : {
"type": "git",
"url": "ssh://git@github.com/USER_NAME/PROJECT_NAME.git"
}
```
This work is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/)
<a href=