Skip to content

Commit

Permalink
Merge pull request #23 from kinde-oss/dave/cicd/setup
Browse files Browse the repository at this point in the history
CICD setup
  • Loading branch information
peterphanouvong authored May 4, 2023
2 parents 5eb6d14 + 160f5b9 commit 043a178
Show file tree
Hide file tree
Showing 45 changed files with 2,360 additions and 337 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
.DS_Store
coverage
18 changes: 18 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"env": {
"browser": true,
"es2021": true
},
"globals": {
"window": true,
"module": true,
"jest": true
},
"extends": ["eslint:recommended", "prettier"],
"parserOptions": {
"ecmaVersion": 13,
"sourceType": "module"
},
"plugins": ["jest"],
"rules": {}
}
4 changes: 4 additions & 0 deletions .github/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
.DS_Store
coverage
18 changes: 18 additions & 0 deletions .github/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"env": {
"browser": true,
"es2021": true
},
"globals": {
"window": true,
"module": true,
"jest": true
},
"extends": ["plugin:jest/recommended", "eslint:recommended", "prettier"],
"parserOptions": {
"ecmaVersion": 13,
"sourceType": "module"
},
"plugins": ["jest"],
"rules": {}
}
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release and Publish to NPM
on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install dependencies and build 🔧
run: npm ci
- name: Initialize Git user
run: |
git config --global user.email "engineering@kinde.com"
git config --global user.name "Kinde Engineering"
- name: Initialize NPM config
run: npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
env:
NPM_TOKEN: ${{secrets.npm_token}}
- name: Run release
run: npm run release --ci
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NPM_TOKEN: ${{secrets.npm_token}}
- name: End message
run: echo 'Job done'
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false
}
16 changes: 16 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"git": {
"requireBranch": "main",
"commitMessage": "chore: release v${version}"
},
"hooks": {
"before:init": ["git pull", "npm run lint"],
"after:bump": "npx auto-changelog -p && npm run build"
},
"github": {
"release": true
},
"npm": {
"publish": true
}
}
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @daveordead @peterphanouvong
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export type State = {
) => KindeFlag;
getBooleanFlag: (code: string, defaultValue?: boolean) => boolean;
getStringFlag: (code, defaultValue) => string;
getIntegerFlag: (code, defaultValue) => integer;
getIntegerFlag: (code, defaultValue) => number;
getPermissions: () => KindePermissions;
getPermission: (key: string) => KindePermission;
getOrganization: () => KindeOrganization;
Expand Down
Loading

0 comments on commit 043a178

Please sign in to comment.