Build: move canary packages to github (#29411)

* ci: wip - add release next npm package step to pr for testing

* ci: remove unpublish logic and use github for package registry

* chore: refresh drone.yml config

* ci: remove redundant variable

* ci: add missing double quote

* chore: move registry arg to npm script

* chore: refresh drone config

* ci: attempt github registry auth

* build: force lerna registry

* build: remote trailing slash

* build: remove obsolete lerna bootstrap, rename next publish files to canary

* chore: remove release_canary_packages step from pr pipeline

* docs(packages): introduce steps for authenticating with github packages

* refactor: move github registry related commands to shell script

* ci(drone): remove echo commands from canary release step

* docs: add missing backtick

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
This commit is contained in:
Jack Westbrook
2020-12-03 11:31:14 +01:00
committed by GitHub
co-authored by Dominik Prokop
parent 2efcd11c12
commit 73af91192d
6 changed files with 68 additions and 79 deletions
+23 -1
View File
@@ -27,7 +27,29 @@ Every commit to master that has changes within the `packages` directory is a sub
<lerna.json version>-<COMMIT_SHA>
```
Automatic prereleases are published under the `canary` dist tag.
Automatic prereleases are published under the `canary` dist tag to the [github package registry](https://docs.github.com/en/free-pro-team@latest/packages/publishing-and-managing-packages/about-github-packages).
#### Consuming prereleases
As mentioned above the `canary` releases are published to the Github package registry rather than the NPM registry. If you wish to make use of these prereleases please follow these steps:
1. You must use a personal access token to install packages from Github. To create an access token [click here](https://github.com/settings/tokens) and create a token with the `read:packages` scope. Make a copy of the token.
2. Create / modify your `~/.npmrc` file with the following:
```
@grafana:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken={INSERT_GH_TOKEN_HERE}
```
3. Update the package.json of your project to use either the `canary` channel or a version of the `canary` channel
```json
// plugin's package.json
{
...
"@grafana/data": "canary"
}
```
### Manual release