Skip to content

Commit 0074147

Browse files
authored
Merge pull request #2 from Dentity-Development/ft/ci-cd
chore: setup the github action, add release action, update package name
2 parents d17bab8 + a78c527 commit 0074147

File tree

15 files changed

+119
-17
lines changed

15 files changed

+119
-17
lines changed

.github/workflows/lint.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: ESLint check
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
branches: ['main']
7+
8+
jobs:
9+
run-eslint:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [20.x]
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.event.pull_request.head.sha }}
21+
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
27+
- run: yarn install
28+
- run: yarn lint

.github/workflows/release.yaml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deployment CI
2+
3+
on:
4+
push:
5+
branches: ['release']
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build-and-deploy:
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [20.x]
17+
18+
env:
19+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: 'yarn'
28+
- run: yarn install
29+
- run: yarn build && touch dist/.nojekyll
30+
31+
- name: Semantic Release
32+
uses: cycjimmy/semantic-release-action@v4
33+
env:
34+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Publish
37+
run: npm publish --//registry.npmjs.org/:_authToken="${{ secrets.NPM_TOKEN }}"

.github/workflows/test.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Run Test case
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
branches: ['main']
7+
8+
jobs:
9+
run-test:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [20.x]
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.event.pull_request.head.sha }}
21+
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
27+
- run: yarn install
28+
- run: yarn test

.releaserc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"branches": [
33
"main",
4-
"master"
4+
"master",
5+
"release"
56
],
67
"plugins": [
78
"@semantic-release/commit-analyzer",

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# dentity-ens-client
1+
# @dentity/ens-client
22

33
A combination of [Dentity](https://dentity.com) and [ENS domains](https://ens.domains) to verify basic information for ENS domain owners.
44

@@ -7,15 +7,15 @@ A combination of [Dentity](https://dentity.com) and [ENS domains](https://ens.d
77
## Install
88

99
``` sh
10-
npm i dentity-ens-client
10+
npm i @dentity/ens-client
1111
```
1212

1313
## Getting started
1414

1515
The simplest example is to get all verifcations shared by Dentity users with their ENS domain. You can easily get all those verifications by initially add to their ENS domain.
1616
``` ts
1717
import { EnsPublicClient, createEnsPublicClient } from '@ensdomains/ensjs';
18-
import { CredentialTemplate, EnsDentityClient } from 'dentity-ens-client';
18+
import { CredentialTemplate, EnsDentityClient } from '@dentity/ens-client';
1919
import { http } from 'viem';
2020
import { mainnet } from 'viem/chains';
2121

@@ -40,7 +40,7 @@ EnsDentityClient.initialize(client as any, 'alice.eth').then((ensClient) => {
4040
Currently Dentity is supporting sharing a number of verification types for ENS domain. You can specifically get any verification by passing in a specific credential template. You can then verify the correctness of that verification.
4141
``` ts
4242
import { EnsPublicClient, createEnsPublicClient } from '@ensdomains/ensjs';
43-
import { CredentialTemplate, DentityEnsClient } from 'dentity-ens-client';
43+
import { CredentialTemplate, DentityEnsClient } from '@dentity/ens-client';
4444
import { http } from 'viem';
4545
import { mainnet } from 'viem/chains';
4646

examples/nodejs/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { EnsPublicClient, createEnsPublicClient } from '@ensdomains/ensjs';
2-
import { CredentialTemplate, DentityEnsClient } from 'dentity-ens-client';
2+
import { CredentialTemplate, DentityEnsClient } from '@dentity/ens-client';
33
import { http } from 'viem';
44
import { mainnet } from 'viem/chains';
55

examples/nodejs/package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/nodejs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"license": "ISC",
1212
"dependencies": {
1313
"@ensdomains/ensjs": "^4.0.1",
14-
"dentity-ens-client": "link:../../"
14+
"@dentity/ens-client": "link:../../"
1515
},
1616
"devDependencies": {
1717
"ts-node": "^10.9.2",

examples/nodejs/yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ delayed-stream@~1.0.0:
236236
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
237237
integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==
238238

239-
"dentity-ens-client@link:../..":
239+
"@dentity/ens-client@link:../..":
240240
version "0.0.0"
241241
uid ""
242242

examples/react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"dependencies": {
2323
"@ensdomains/ensjs": "^4.0.1",
2424
"copy-to-clipboard": "^3.3.3",
25-
"dentity-ens-client": "link:../../",
25+
"@dentity/ens-client": "link:../../",
2626
"react": "^18.3.1",
2727
"react-dom": "^18.3.1",
2828
"react-json-view": "^1.21.3",

examples/react/src/components/Modal/CredentialDetailModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import MiniLoading from '../Icon/MiniLoading';
77
import {
88
DentityEnsClient,
99
VerifiableCredentialPresentationResponse,
10-
} from 'dentity-ens-client';
10+
} from '@dentity/ens-client';
1111
import { toast } from 'react-toastify';
1212
import Tick from '../Icon/Tick';
1313

examples/react/src/pages/EnsDetail/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
DentityEnsClient,
77
VerifiableCredentialPresentation,
88
CredentialTemplate,
9-
} from 'dentity-ens-client';
9+
} from '@dentity/ens-client';
1010
import { useLayoutEffect, useMemo, useState } from 'react';
1111
import Discord from '../../components/Icon/Discord';
1212
import Email from '../../components/Icon/Email';

examples/react/vite.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ export default defineConfig({
2121
port: 3000,
2222
},
2323
optimizeDeps: {
24-
include: ['dentity-ens-client'],
24+
include: ['@dentity/ens-client'],
2525
},
2626
});

examples/react/yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ delayed-stream@~1.0.0:
901901
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
902902
integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==
903903

904-
"dentity-ens-client@link:../..":
904+
"@dentity/ens-client@link:../..":
905905
version "0.0.0"
906906
uid ""
907907

package.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@dentity/ens-client",
33
"repository": {
4-
"url": "https://github.com/Dentity-Development/ens-client.git"
4+
"url": "git+https://github.com/Dentity-Development/ens-client.git"
55
},
66
"version": "1.0.0",
77
"author": "Dentity",
@@ -66,5 +66,13 @@
6666
"resolutions": {
6767
"wrap-ansi": "7.0.0",
6868
"string-width": "4.2.3"
69+
},
70+
"bugs": {
71+
"url": "https://github.com/Dentity-Development/ens-client/issues"
72+
},
73+
"homepage": "https://github.com/Dentity-Development/ens-client#readme",
74+
"directories": {
75+
"example": "examples",
76+
"test": "tests"
6977
}
7078
}

0 commit comments

Comments
 (0)