Build: Publish canary packages to NPM registry (#42922)
* ci(packages): replace canary github publishing with npm registry * chore(drone): refresh yaml config * docs(packages): remove github package publish explanation
This commit is contained in:
@@ -13,15 +13,14 @@ function prepare_version_commit () {
|
||||
|
||||
# check if there were any changes to packages between current and previous commit
|
||||
count=$(git diff HEAD~1..HEAD --name-only -- packages | awk '{c++} END {print c}')
|
||||
count="1"
|
||||
|
||||
if [ -z "$count" ]; then
|
||||
echo "No changes in packages, skipping packages publishing"
|
||||
else
|
||||
echo "Changes detected in ${count} packages"
|
||||
echo "Starting to release latest canary version"
|
||||
|
||||
echo "@grafana:registry=https://npm.pkg.github.com" >> ~/.npmrc
|
||||
echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGE_TOKEN}" >> ~/.npmrc
|
||||
echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" >> ~/.npmrc
|
||||
|
||||
# For some reason the --no-git-reset is not working as described so
|
||||
# to get lerna to publish the packages we need to do a commit to the
|
||||
@@ -29,6 +28,6 @@ else
|
||||
prepare_version_commit
|
||||
|
||||
echo $'\nPublishing packages'
|
||||
yarn packages:publishCanary --registry https://npm.pkg.github.com
|
||||
yarn packages:publishCanary
|
||||
fi
|
||||
|
||||
|
||||
@@ -909,7 +909,7 @@ def release_canary_npm_packages_step(edition):
|
||||
'end-to-end-tests-various-suite',
|
||||
],
|
||||
'environment': {
|
||||
'GITHUB_PACKAGE_TOKEN': from_secret('github_package_token'),
|
||||
'NPM_TOKEN': from_secret('npm_token'),
|
||||
},
|
||||
'commands': [
|
||||
'./scripts/circle-release-canary-packages.sh',
|
||||
|
||||
Reference in New Issue
Block a user