Skip to content

Commit

Permalink
Merge pull request #82 from lidofinance/npm-publish
Browse files Browse the repository at this point in the history
feat: npm publish init
  • Loading branch information
itaven authored Aug 31, 2023
2 parents 3a5db97 + 63213a3 commit 99bf2e6
Show file tree
Hide file tree
Showing 9 changed files with 2,989 additions and 1,138 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/deploy.yml → .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: deploy
name: publish

on:
push:
Expand All @@ -21,14 +21,14 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.15'
node-version: 16
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Install root dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Run lint
run: yarn lint
- name: Build Components
run: yarn build

- name: Setup NPM token
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
Expand All @@ -38,4 +38,6 @@ jobs:
- name: Publish to NPM
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn run publish
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run:
yarn multi-semantic-release --deps.bump=override --deps.release=patch --sequential-init
39 changes: 13 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"name": "wallets-testing-modules",
"version": "0.0.1",
"version": "0.0.0-development",
"description": "Common modules for testing wallets",
"private": true,
"workspaces": [
"packages/*",
"wallets-testing/"
"packages/wallets",
"packages/extensions",
"packages/widgets",
"packages/nodes",
"wallets-testing"
],
"sideEffects": false,
"scripts": {
"build": "tsc --build",
"build": "yarn workspaces run build",
"test": "playwright test",
"lint": "eslint --ext ts .",
"publish": "release-it --ci",
"publish:dry": "release-it --ci --dry-run"
"lint": "eslint --ext ts ."
},
"devDependencies": {
"@release-it-plugins/workspaces": "^3.2.0",
"@release-it/conventional-changelog": "^5.1.1",
"@types/eslint-plugin-prettier": "^3.1.0",
"@types/node": "^18.11.15",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"@qiwi/multi-semantic-release": "6.7.0",
"dotenv": "^16.0.3",
"eslint": "^8.29.0",
"eslint-config-prettier": "^8.5.0",
Expand All @@ -40,22 +40,9 @@
"prettier --write"
]
},
"release-it": {
"git": {
"commit": false,
"tag": true
},
"github": {
"release": true
},
"npm": {
"ignoreVersion": true
},
"plugins": {
"@release-it-plugins/workspaces": true,
"@release-it/conventional-changelog": {
"preset": "angular"
}
}
"release": {
"branches": [
"main"
]
}
}
7 changes: 5 additions & 2 deletions packages/extensions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lidofinance/wallets-testing-extensions",
"version": "0.0.1",
"version": "0.0.0",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"license": "MIT",
Expand All @@ -14,12 +14,15 @@
"url": "https://github.com/lidofinance/wallets-testing-modules/issues"
},
"sideEffects": false,
"scripts": {
"build": "tsc --build"
},
"keywords": [
"lido",
"lidofinance"
],
"files": [
"dist/*"
"dist"
],
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down
7 changes: 5 additions & 2 deletions packages/nodes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lidofinance/wallets-testing-nodes",
"version": "0.0.1",
"version": "0.0.0",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"license": "MIT",
Expand All @@ -14,12 +14,15 @@
"url": "https://github.com/lidofinance/wallets-testing-modules/issues"
},
"sideEffects": false,
"scripts": {
"build": "tsc --build"
},
"keywords": [
"lido",
"lidofinance"
],
"files": [
"dist/*"
"dist"
],
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down
7 changes: 5 additions & 2 deletions packages/wallets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lidofinance/wallets-testing-wallets",
"version": "0.0.1",
"version": "0.0.0",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"license": "MIT",
Expand All @@ -14,12 +14,15 @@
"url": "https://github.com/lidofinance/wallets-testing-modules/issues"
},
"sideEffects": false,
"scripts": {
"build": "tsc --build"
},
"keywords": [
"lido",
"lidofinance"
],
"files": [
"dist/*"
"dist"
],
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down
9 changes: 6 additions & 3 deletions packages/widgets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lidofinance/wallets-testing-widgets",
"version": "0.0.1",
"version": "0.0.0",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"license": "MIT",
Expand All @@ -14,19 +14,22 @@
"url": "https://github.com/lidofinance/wallets-testing-modules/issues"
},
"sideEffects": false,
"scripts": {
"build": "tsc --build"
},
"keywords": [
"lido",
"lidofinance"
],
"files": [
"dist/*"
"dist"
],
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"dependencies": {
"@lidofinance/wallets-testing-wallets": "link:../wallets",
"@lidofinance/wallets-testing-wallets": "*",
"@nestjs/common": "^8.2.5",
"@nestjs/config": "^2.2.0",
"@playwright/test": "^1.29.1",
Expand Down
17 changes: 8 additions & 9 deletions wallets-testing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wallets-testing",
"version": "0.0.1",
"version": "0.0.0",
"description": "",
"author": "",
"private": true,
Expand All @@ -13,16 +13,15 @@
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"pretest": "tsc --incremental -p tsconfig.json",
"test": "yarn pretest && playwright test -c ./dist",
"test:smoke": "yarn pretest && playwright test -c ./dist smoke",
"test:widgets": "yarn pretest && playwright test -c ./dist widgets"
"test": "playwright test -c ./dist",
"test:smoke": "playwright test -c ./dist smoke",
"test:widgets": "playwright test -c ./dist widgets"
},
"dependencies": {
"@lidofinance/wallets-testing-extensions": "link:../packages/extensions",
"@lidofinance/wallets-testing-nodes": "link:../packages/nodes",
"@lidofinance/wallets-testing-wallets": "link:../packages/wallets",
"@lidofinance/wallets-testing-widgets": "link:../packages/widgets",
"@lidofinance/wallets-testing-extensions": "*",
"@lidofinance/wallets-testing-nodes": "*",
"@lidofinance/wallets-testing-wallets": "*",
"@lidofinance/wallets-testing-widgets": "*",
"@nestjs/common": "^9.0.0",
"@nestjs/config": "^2.2.0",
"@nestjs/core": "^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion wallets-testing/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
"exclude": ["node_modules", "dist"]
}
Loading

0 comments on commit 99bf2e6

Please sign in to comment.