Skip to content

Commit

Permalink
feat: github migration [EXT-5011] (#553)
Browse files Browse the repository at this point in the history
* feat: github migration [EXT-5011]

* adding context

* fixing build

* fix: [] - fix build

* fix: [] - fix build

---------

Co-authored-by: Cormac de Barra <cormac.debarra@contentful.com>
  • Loading branch information
1 parent de094de commit c473ad7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
25 changes: 17 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ orbs:
commands:
setup-npm:
steps:
- run:
name: Provide NPM Token
command: |-
echo $'@contentful:registry=https://registry.npmjs.org/
//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> ~/.npmrc
- vault/get-secrets:
template-preset: "packages-read"
- run: echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_READ_TOKEN}" > ~/.npmrc
- run: echo "@contentful:registry=https://npm.pkg.github.com" >> ~/.npmrc

jobs:

Expand All @@ -25,6 +24,7 @@ jobs:
- checkout
- node/install:
node-version: << parameters.node-version >>
- setup-npm
- run: npm ci
- run:
name: Run linter
Expand All @@ -40,6 +40,7 @@ jobs:
- checkout
- node/install:
node-version: "18"
- setup-npm
- run: npm ci
- run: npm run build
- run: npm run build:docs
Expand All @@ -51,6 +52,7 @@ jobs:
- checkout
- node/install:
node-version: "18"
- setup-npm
- run: npm ci

semantic-release:
Expand All @@ -60,9 +62,10 @@ jobs:
- checkout
- vault/get-secrets:
template-preset: "semantic-release-ecosystem"
- run: echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_WRITE_TOKEN}" > ~/.npmrc
- run: echo "@contentful:registry=https://npm.pkg.github.com" >> ~/.npmrc
- node/install:
node-version: "20.8.1"
- setup-npm
- run: npm ci
- run:
name: Releasing
Expand All @@ -72,11 +75,17 @@ workflows:
lint-build-release:
jobs:
- lint-and-test:
context:
- vault
matrix:
parameters:
node-version: ["18.12.0", "20.6.1"]
- lint-commits
- build
- lint-commits:
context:
- vault
- build:
context:
- vault
- semantic-release:
context:
- vault
Expand Down
8 changes: 7 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
version: 2

registries:
npm-github:
type: npm-registry
url: https://npm.pkg.github.com
token: ${{secrets.NPM_REGISTRY_REGISTRY_GH_ORG_TOKEN}}
updates:
- package-ecosystem: npm
registries:
- npm-github
directory: "/"
schedule:
interval: daily
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c473ad7

Please sign in to comment.