diff --git a/.circleci/config.yml b/.circleci/config.yml index 44ea963b..b9392105 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,9 @@ cache-key: &cache-key commands: use_npm_token: steps: - - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc + - run: | + echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_READ_TOKEN}" > ~/.npmrc + echo "@contentful:registry=https://npm.pkg.github.com" >> ~/.npmrc yarn_install: steps: @@ -37,7 +39,7 @@ jobs: steps: - checkout - vault/get-secrets: - template-preset: npm-read + template-preset: packages-read - yarn_install - run: yarn build - run: yarn lint @@ -52,11 +54,13 @@ jobs: steps: - checkout - vault/get-secrets: - template-preset: semantic-release-ecosystem + template-preset: semantic-release - run: git config --global user.email $GIT_COMMITTER_EMAIL - run: git config --global user.name $GIT_COMMITTER_NAME - run: git remote set-url origin "https://$GIT_AUTHOR_NAME:$GITHUB_TOKEN@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" - - use_npm_token + - run: | + echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_WRITE_TOKEN}" > ~/.npmrc + echo "@contentful:registry=https://npm.pkg.github.com" >> ~/.npmrc - yarn_install - run: yarn build - run: yarn lerna:version @@ -67,7 +71,7 @@ jobs: steps: - checkout - vault/get-secrets: - template-preset: npm-read + template-preset: packages-read - vault/get-secrets: template-preset: github-comment - use_npm_token diff --git a/.contentful/vault-secrets.yaml b/.contentful/vault-secrets.yaml index e99fbbd9..95e448d3 100644 --- a/.contentful/vault-secrets.yaml +++ b/.contentful/vault-secrets.yaml @@ -5,7 +5,6 @@ services: - dependabot circleci: policies: - - npm-read - github-comment - - semantic-release-ecosystem + - semantic-release - packages-read diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c1f57571..60b4b6ff 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,6 +5,10 @@ registries: type: npm-registry url: https://registry.npmjs.org token: '${{secrets.NPM_REGISTRY_REGISTRY_NPMJS_ORG_TOKEN}}' + npm-github: + type: npm-registry + url: https://npm.pkg.github.com + token: ${{secrets.NPM_REGISTRY_REGISTRY_GH_ORG_TOKEN}} updates: - package-ecosystem: npm @@ -22,5 +26,6 @@ updates: prefix: chore registries: - npm-registry-registry-npmjs-org + - npm-github reviewers: - 'contentful/team-tolkien' diff --git a/packages/contentful-slatejs-adapter/package.json b/packages/contentful-slatejs-adapter/package.json index b4336182..93e1213d 100644 --- a/packages/contentful-slatejs-adapter/package.json +++ b/packages/contentful-slatejs-adapter/package.json @@ -56,6 +56,7 @@ "typescript": "^4.4.2" }, "publishConfig": { - "access": "public" + "access": "public", + "registry": "https://npm.pkg.github.com/" } } diff --git a/packages/rich-text-from-markdown/package.json b/packages/rich-text-from-markdown/package.json index 98285136..a2c6abb9 100644 --- a/packages/rich-text-from-markdown/package.json +++ b/packages/rich-text-from-markdown/package.json @@ -24,7 +24,8 @@ "url": "git+https://github.com/contentful/rich-text.git" }, "publishConfig": { - "access": "public" + "access": "public", + "registry": "https://npm.pkg.github.com/" }, "scripts": { "prebuild": "rimraf dist", diff --git a/packages/rich-text-html-renderer/package.json b/packages/rich-text-html-renderer/package.json index 9938b3f9..07bad9fe 100644 --- a/packages/rich-text-html-renderer/package.json +++ b/packages/rich-text-html-renderer/package.json @@ -15,7 +15,8 @@ "node": ">=6.0.0" }, "publishConfig": { - "access": "public" + "access": "public", + "registry": "https://npm.pkg.github.com/" }, "scripts": { "prebuild": "rimraf dist", diff --git a/packages/rich-text-links/package.json b/packages/rich-text-links/package.json index 081d5448..69fe4539 100644 --- a/packages/rich-text-links/package.json +++ b/packages/rich-text-links/package.json @@ -15,7 +15,8 @@ "node": ">=6.0.0" }, "publishConfig": { - "access": "public" + "access": "public", + "registry": "https://npm.pkg.github.com/" }, "scripts": { "build": "tsc --module commonjs && rollup -c rollup.config.js", diff --git a/packages/rich-text-plain-text-renderer/package.json b/packages/rich-text-plain-text-renderer/package.json index 21e05872..b84823be 100644 --- a/packages/rich-text-plain-text-renderer/package.json +++ b/packages/rich-text-plain-text-renderer/package.json @@ -15,7 +15,8 @@ "node": ">=6.0.0" }, "publishConfig": { - "access": "public" + "access": "public", + "registry": "https://npm.pkg.github.com/" }, "scripts": { "build": "tsc --module commonjs && rollup -c rollup.config.js", diff --git a/packages/rich-text-react-renderer/package.json b/packages/rich-text-react-renderer/package.json index daeaa1d4..9add4d80 100644 --- a/packages/rich-text-react-renderer/package.json +++ b/packages/rich-text-react-renderer/package.json @@ -15,7 +15,8 @@ "node": ">=6.0.0" }, "publishConfig": { - "access": "public" + "access": "public", + "registry": "https://npm.pkg.github.com/" }, "scripts": { "prebuild": "rimraf dist", diff --git a/packages/rich-text-types/package.json b/packages/rich-text-types/package.json index b36ee3f6..c9b48e28 100644 --- a/packages/rich-text-types/package.json +++ b/packages/rich-text-types/package.json @@ -15,7 +15,8 @@ "node": ">=6.0.0" }, "publishConfig": { - "access": "public" + "access": "public", + "registry": "https://npm.pkg.github.com/" }, "scripts": { "prebuild": "rimraf dist",