Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release beta azure signing manager #54

Closed
wants to merge 12 commits into from
Closed
12 changes: 8 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx", "simple-import-sort"],
"plugins": ["@nx", "simple-import-sort"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -24,14 +24,18 @@
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"extends": ["plugin:@nx/typescript"],
"rules": {
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": ["strictCamelCase"]
},
{
"selector": "import",
"format": ["camelCase", "PascalCase"]
},
{
"selector": "variable",
"format": ["strictCamelCase", "UPPER_CASE"]
Expand Down Expand Up @@ -76,7 +80,7 @@
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
}
]
Expand Down
29 changes: 5 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: CI

on:
push:
branches: [main, beta, alpha]
pull_request:
types: [assigned, opened, synchronize, reopened]

Expand All @@ -11,35 +9,18 @@ jobs:
name: Linting and testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: install dependencies
run: yarn --frozen-lockfile
- name: lint and test
uses: mansagroup/nrwl-nx-action@v2
uses: mansagroup/nrwl-nx-action@v3
with:
targets: lint,test
maxParallel: 3

release:
name: Building and releasing project
runs-on: ubuntu-latest
needs: [lint-and-test]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: install dependencies
run: yarn --frozen-lockfile
- name: build and release
run: yarn nx run-many --all --target=release --parallel=1
env:
CI: true
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
NPM_TOKEN: ${{ secrets.ASSOCIATION_NPM_TOKEN }}

check-fast-forward:
name: Check if fast forwarding is possible
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: release

on:
push:
branches: [main, beta, alpha]

jobs:
lint-and-test:
name: Linting and testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: install dependencies
run: yarn --frozen-lockfile
- name: lint and test
uses: mansagroup/nrwl-nx-action@v3
with:
targets: lint,test
release:
name: Building and releasing project
runs-on: ubuntu-latest
needs: ['lint-and-test']
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: "https://registry.npmjs.org"
- name: Setup Git
run: |
git config user.name "Eric Richardson"
git config user.email "[email protected]"
- name: install dependencies
run: yarn --frozen-lockfile
- name: build and release
run: |
yarn nx run @polymeshassociation/azure-signing-manager:semantic-release --verbose
# TODO use: yarn nx run-many --all --target=semantic-release --parallel=false

env:
CI: true
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.ASSOCIATION_NPM_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ testem.log
Thumbs.db

# Local testing
packages/*/sandbox
packages/*/sandbox

.nx
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

/dist
/coverage

/.nx/cache
/.nx/workspace-data
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"polywallet",
"Resonse",
"satoshi",
"secp",
"sonarcloud",
"tscpaths",
"Unsub"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SigningManagers

Monorepo for Polymesh SDK compatible Signing Managers.
Monorepo for Polymesh SDK compatible Signing Managers. A signing manager abstracts key signing operations to provide a uniform interface for a variety of key storage solutions

## Projects

Expand All @@ -10,6 +10,7 @@ Monorepo for Polymesh SDK compatible Signing Managers.
| **Browser Extension Signing Manager** | [`@polymeshassociation/browser-extension-signing-manager`](https://npmjs.com/package/@polymeshassociation/browser-extension-signing-manager) | [![npm latest version](https://img.shields.io/npm/v/@polymeshassociation/browser-extension-signing-manager/latest.svg)](https://www.npmjs.com/package/@polymeshassociation/browser-extension-signing-manager) | [![README](https://img.shields.io/badge/README--green.svg)](/packages/browser-extension-signing-manager/README.md) [![CHANGELOG](https://img.shields.io/badge/CHANGELOG--orange.svg)](/packages/browser-extension-signing-manager/CHANGELOG.md) |
| **Hashicorp Vault Signing Manager** | [`@polymeshassociation/hashicorp-vault-signing-manager`](https://npmjs.com/package/@polymeshassociation/hashicorp-vault-signing-manager) | [![npm latest version](https://img.shields.io/npm/v/@polymeshassociation/hashicorp-vault-signing-manager/latest.svg)](https://www.npmjs.com/package/@polymeshassociation/hashicorp-vault-signing-manager) | [![README](https://img.shields.io/badge/README--green.svg)](/packages/hashicorp-vault-signing-manager/README.md) [![CHANGELOG](https://img.shields.io/badge/CHANGELOG--orange.svg)](/packages/hashicorp-vault-signing-manager/CHANGELOG.md) |
| **Fireblocks Signing Manager** | [`@polymeshassociation/fireblocks-signing-manager`](https://npmjs.com/package/@polymeshassociation/fireblocks-signing-manager) | [![npm latest version](https://img.shields.io/npm/v/@polymeshassociation/fireblocks-signing-manager/latest.svg)](https://www.npmjs.com/package/@polymeshassociation/fireblocks-signing-manager) | [![README](https://img.shields.io/badge/README--green.svg)](/packages/fireblocks-signing-manager/README.md) [![CHANGELOG](https://img.shields.io/badge/CHANGELOG--orange.svg)](/packages/fireblocks-signing-manager/CHANGELOG.md) |
| **Azure Signing Manager** | [`@polymeshassociation/azure-signing-manager`](https://npmjs.com/package/@polymeshassociation/azure-signing-manager) | [![npm latest version](https://img.shields.io/npm/v/@polymeshassociation/azure-signing-manager/latest.svg)](https://www.npmjs.com/package/@polymeshassociation/azure-signing-manager) | [![README](https://img.shields.io/badge/README--green.svg)](/packages/azure-signing-manager/README.md) [![CHANGELOG](https://img.shields.io/badge/CHANGELOG--orange.svg)](/packages/azure-signing-manager/CHANGELOG.md) |

## Scripts

Expand Down
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
'approval-signing-manager',
'fireblocks-signing-manager',
'walletconnect-signing-manager',
'azure-signing-manager',
],
],
},
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { getJestProjects } = require('@nrwl/jest');
const { getJestProjects } = require('@nx/jest');

module.exports = {
projects: getJestProjects(),
Expand Down
4 changes: 2 additions & 2 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const nxPreset = require('@nrwl/jest/preset');
const nxPreset = require('@nx/jest/preset');
const tsPreset = require('ts-jest/presets/js-with-babel/jest-preset');

module.exports = {
...nxPreset,
...tsPreset,
coverageReporters: [...nxPreset.coverageReporters, 'text'],
coverageReporters: ['text'],
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
transformIgnorePatterns: ['/node_modules/(?!@polkadot|@babel/runtime/helpers/esm/)'],
};
69 changes: 50 additions & 19 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,67 @@
{
"extends": "@nrwl/workspace/presets/core.json",
"npmScope": "signing-managers",
"affected": {
"defaultBase": "main"
"targetDefaults": {
"build": {
"cache": true
},
"lint": {
"cache": true
},
"test": {
"cache": true
},
"e2e": {
"cache": true
},
"semantic-release": {
"dependsOn": ["^semantic-release"]
}
},
"cli": {
"defaultCollection": "@nrwl/workspace"
"workspaceLayout": {
"libsDir": "packages"
},
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/workspace/tasks-runners/default",
"plugins": [
{
"plugin": "@nx/js/typescript",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"]
"typecheck": {
"targetName": "typecheck"
},
"build": {
"targetName": "tsc:build",
"configName": "tsconfig.lib.json"
}
}
},
{
"plugin": "@nx/eslint/plugin",
"options": {
"targetName": "eslint:lint"
}
}
],
"extends": "@nx/workspace/presets/core.json",
"tasksRunnerOptions": {
"default": {
"runner": "@nx/workspace/tasks-runners/default",
"options": {}
}
},
"targetDependencies": {
"build": [
{
"target": "build",
"projects": "dependencies"
}
],
"release": [
"@nx/js:tsc": {
"cache": true,
"dependsOn": ["^build"],
"inputs": ["default", "^default"]
},
"semantic-release": [
{
"target": "build",
"projects": "self"
},
{
"target": "release",
"target": "semantic-release",
"projects": "dependencies"
}
]
}
},
"defaultBase": "main"
}
54 changes: 29 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,50 +22,51 @@
"tslib": "^2.0.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "13.2.3",
"@angular-devkit/core": "^13.2.3",
"@angular/compiler": "13.2.3",
"@angular/compiler-cli": "^13.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-transform-modules-commonjs": "^7.16.8",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.16.11",
"@commitlint/cli": "^16.2.1",
"@commitlint/config-conventional": "^16.2.1",
"@ng-easy/builders": "^5.2.0",
"@nrwl/cli": "13.8.2",
"@nrwl/devkit": "13.8.2",
"@nrwl/eslint-plugin-nx": "13.8.2",
"@nrwl/jest": "13.8.2",
"@nrwl/js": "13.8.2",
"@nrwl/linter": "13.8.2",
"@nrwl/node": "^13.8.2",
"@nrwl/tao": "13.8.2",
"@nrwl/workspace": "13.8.2",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@golevelup/ts-jest": "^0.5.6",
"@nx/devkit": "20.0.0",
"@nx/eslint": "20.0.0",
"@nx/eslint-plugin": "20.0.0",
"@nx/jest": "20.0.0",
"@nx/js": "20.0.0",
"@nx/node": "20.0.0",
"@nx/web": "20.0.0",
"@nx/workspace": "20.0.0",
"@open-wc/webpack-import-meta-loader": "^0.4.7",
"@types/jest": "27.0.2",
"@types/node": "16.11.7",
"@swc-node/register": "~1.9.1",
"@swc/core": "~1.5.7",
"@swc/helpers": "~0.5.11",
"@theunderscorer/nx-semantic-release": "^2.12.0",
"@types/jest": "29.5.13",
"@types/jest-when": "^3.5.2",
"@types/node": "18.19.9",
"@types/require-from-string": "^1.2.1",
"@typescript-eslint/eslint-plugin": "~5.10.0",
"@typescript-eslint/parser": "~5.10.0",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"babel-loader": "^8.2.3",
"commitiquette": "^1.2.1",
"commitizen": "^4.2.4",
"cz-conventional-changelog": "^3.3.0",
"eslint": "~8.7.0",
"eslint-config-prettier": "8.1.0",
"eslint": "8.57.1",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"html-webpack-plugin": "^5.5.0",
"husky": "^7.0.4",
"husky": "^9.1.6",
"is-ci": "^3.0.1",
"jest": "27.2.3",
"jest": "29.7.0",
"jest-when": "^3.6.0",
"lint-staged": "^12.3.4",
"node-polyfill-webpack-plugin": "^1.1.4",
"prettier": "^2.5.1",
"require-from-string": "^2.0.2",
"rxjs": "~6.6.7",
"ts-jest": "27.0.5",
"ts-jest": "29.1.5",
"ts-loader": "^9.2.6",
"ts-node": "^10.5.0",
"tsconfig-paths": "^3.12.0",
Expand All @@ -78,6 +79,9 @@
"workspaces": [
"packages/**"
],
"nxrelease": {
"repositoryUrl": "https://github.com/PolymeshAssociation/signing-managers"
},
"config": {
"commitizen": {
"path": "commitiquette"
Expand Down
2 changes: 1 addition & 1 deletion packages/approval-signing-manager/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]]
"presets": [["@nx/web/babel", { "useBuiltIns": "usage" }]]
}
Loading
Loading