Skip to content

Commit

Permalink
Feature/release (#351)
Browse files Browse the repository at this point in the history
* ci: release script

* Release 2.0.0-alpha.200

* Release v2.0.0-alpha.201

* ci: deploy yml

* ci: fixed pre-commit

* ci: fixed deploy job

* ci: deploy job

* ci: fixed build

* style: format

* style: renamed sdk to tatum

* ci: fix github actions

* ci: fix github actions

* Release v2.0.0-alpha.203

* ci: fix github actions

* ci: fix github actions

* ci: fix github actions

* Release v2.0.0-rc.2

* ci: fix github actions

* Release v2.0.0-rc.3

* ci: fix github actions

* Release v2.0.0-rc.4

* ci: fix github actions

* Release v2.0.0-rc.6

* ci: fix github actions

* ci: fix github actions

* Release v2.0.0-rc.7

* ci: fix github actions

* Release v2.0.1-alpha.2

* ci: fix github actions

* docs: changed contributing info

* Release 2.0.1-alpha.201

* Release v2.0.1-alpha.202

* ci: release

* Release v2.0.1-alpha.203

* ci: release

* ci: release

Co-authored-by: Nick Papirniy <[email protected]>
Co-authored-by: Hathoriel <[email protected]>
  • Loading branch information
3 people authored Feb 1, 2022
1 parent 0a5f6a1 commit db9b7bd
Show file tree
Hide file tree
Showing 81 changed files with 2,722 additions and 213 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Publish all packages

on:
push:
branches:
- master

jobs:
agents:
runs-on: ubuntu-latest
name: Agent 1
timeout-minutes: 60
strategy:
matrix:
agent: [ 1, 2, 3 ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14'
- run: yarn
- name: Start Nx Agent ${{ matrix.agent }}
run: npx nx-cloud start-agent
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout [main]
with:
fetch-depth: 0

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/setup-node@v1
with:
node-version: '14'

- run: yarn --ignore-scripts --frozen-lockfile

- run: npx nx-cloud start-ci-run
- run: yarn build:all
- run: npx nx-cloud stop-all-agents

- run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > ~/.npmrc
- run: npm config set tag-version-prefix ''

- name: Config git email
run: git config --global user.email "[email protected]"

- name: Config git name
run: git config --global user.name "Hathoriel"

- name: Publish packages
run: yarn --ignore-scripts release:prerelease
env:
GH_TOKEN: ${{ secrets.PAT_GITHUB }}
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

34 changes: 0 additions & 34 deletions .github/workflows/deploy.yaml.disabled

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ Thumbs.db

.env
migrations.json
storage
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tag-version-prefix=""
6 changes: 3 additions & 3 deletions CONRTIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

## EVM Based

nx g @nrwl/js:library sdk-{BLOCKCHAIN_NAME} --directory=blockchain --simpleModuleName=true --buildable --publishable --importPath=@tatumio/{BLOCKCHAIN_NAME} --testEnvironment=node --tags=scope:sdk,scope:evm-based
nx g @nrwl/node:library sdk-{BLOCKCHAIN_NAME} --directory=blockchain --simpleModuleName=true --buildable --publishable --importPath=@tatumio/{BLOCKCHAIN_NAME} --testEnvironment=node --tags=scope:sdk,scope:evm-based

## Btc Based

nx g @nrwl/js:library sdk-{BLOCKCHAIN_NAME} --directory=blockchain --simpleModuleName=true --buildable --publishable --importPath=@tatumio/{BLOCKCHAIN_NAME} --testEnvironment=node --tags=scope:sdk,scope:btc-based
nx g @nrwl/node:library sdk-{BLOCKCHAIN_NAME} --directory=blockchain --simpleModuleName=true --buildable --publishable --importPath=@tatumio/{BLOCKCHAIN_NAME} --testEnvironment=node --tags=scope:sdk,scope:btc-based

## Other (not evm and not btc)

nx g @nrwl/js:library sdk-{BLOCKCHAIN_NAME} --directory=blockchain --simpleModuleName=true --buildable --publishable --importPath=@tatumio/{BLOCKCHAIN_NAME} --testEnvironment=node --tags=scope:sdk
nx g @nrwl/node:library sdk-{BLOCKCHAIN_NAME} --directory=blockchain --simpleModuleName=true --buildable --publishable --importPath=@tatumio/{BLOCKCHAIN_NAME} --testEnvironment=node --tags=scope:sdk

# Check workspace.json file to make sure module has correct name

Expand Down
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
{
"name": "tatumio",
"version": "2.0.0-alpha.0",
"version": "2.0.1-alpha.203",
"license": "MIT",
"repository": "https://github.com/tatumio/tatum-js",
"scripts": {
"start": "nx serve",
"build": "nx affected:build",
"build:all": "nx run-many --target=build --all --parallel",
"build:libs": "nx run-many --target=build --projects=$(nx affected:libs --plain | sed 's/ /,/g')",
"test:ci": "nx run-many --target=test --all --parallel --max-parallel=3 --coverage --coverageReporters=lcov && node ./tools/coverageMerger.js",
"lint": "nx affected:lint --parallel",
"format": "nx format:write",
"test": "nx affected:test --parallel",
"dep-graph": "nx dep-graph",
"generate-api": "openapi --exportCore false --useUnionTypes true --client axios --input ./packages/api-client/src/api_schema.json --output ./packages/api-client/src/generated",
"release:prerelease": "nxpm release $(npm --tag-version-prefix='' --no-git-tag-version version prerelease) --ci --fix",
"registry:start": "nxpm registry:start",
"registry:enable": "nxpm registry:enable",
"registry:disable": "nxpm registry:disable",
"registry:status": "nxpm registry:status",
"prepare": "husky install"
},
"private": true,
"dependencies": {
"@tatumio/bitcoincashjs2-lib": "^4.1.2",
"axios": "^0.24.0",
Expand All @@ -32,8 +38,8 @@
"form-data": "^4.0.0",
"hdkey": "^2.0.1",
"reflect-metadata": "^0.1.13",
"stellar-sdk": "^8.1.0",
"ripple-lib": "^1.7.1",
"stellar-sdk": "^8.1.0",
"tslib": "^2.0.0",
"web3": "^1.7.0",
"web3-core": "^1.7.0",
Expand Down Expand Up @@ -67,6 +73,7 @@
"glob": "^7.2.0",
"husky": "^7.0.4",
"jest": "^27.4.5",
"nxpm": "^2.0.0",
"openapi-typescript-codegen": "^0.12.5",
"prettier": "2.5.1",
"ts-jest": "27.0.5",
Expand Down
3 changes: 2 additions & 1 deletion packages/api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "@tatumio/api-client",
"version": "0.0.1"
"version": "v2.0.1-alpha.203",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/api-client/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"executor": "@nrwl/node:package",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/api-client",
Expand Down
3 changes: 2 additions & 1 deletion packages/blockchain/bch/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "@tatumio/bch",
"version": "0.0.1"
"version": "v2.0.1-alpha.203",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/bch/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"executor": "@nrwl/node:package",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/blockchain/bch",
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/bch/src/lib/bch.sdk.errors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SdkError, SdkErrorCode } from '@tatumio/abstract-sdk'
import { SdkError, SdkErrorCode } from '@tatumio/shared-abstract-sdk'

export const BCH_ERRORS_MAPPING = {
'Transaction has absurd fees': SdkErrorCode.BTC_FEE_IS_TOO_LARGE,
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/bch/src/lib/bch.sdk.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Blockchain } from '@tatumio/shared-core'
import { btcBasedSdk } from '@tatumio/shared-blockchain-btc-based'
import { BlockchainBitcoinCashService } from '@tatumio/api-client'
import { SDKArguments } from '@tatumio/abstract-sdk'
import { SDKArguments } from '@tatumio/shared-abstract-sdk'
import { bchTransactions } from './bch.sdk.tx'
import { bchWallet } from './bch.sdk.wallet'

Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/bch/src/lib/bch.sdk.tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@tatumio/api-client'
import { bcashAddressHelper } from './utils/bch.address'
import { BchSdkError } from './bch.sdk.errors'
import { amountUtils, SdkErrorCode } from '@tatumio/abstract-sdk'
import { amountUtils, SdkErrorCode } from '@tatumio/shared-abstract-sdk'

import coininfo from 'coininfo'
import { ECPair, ECSignature, TransactionBuilder } from '@tatumio/bitcoincashjs2-lib'
Expand Down
3 changes: 2 additions & 1 deletion packages/blockchain/bsc/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "@tatumio/bsc",
"version": "0.0.1"
"version": "v2.0.1-alpha.203",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/bsc/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"executor": "@nrwl/node:package",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/blockchain/bsc",
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/bsc/src/lib/bsc.sdk.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { evmBasedSdk } from '@tatumio/shared-blockchain-evm-based'
import { Blockchain, Web3Request, Web3Response } from '@tatumio/shared-core'
import { BlockchainBscService } from '@tatumio/api-client'
import { SDKArguments } from '@tatumio/abstract-sdk'
import { SDKArguments } from '@tatumio/shared-abstract-sdk'
import { bscWeb3 } from './services/bsc.web3'
import { bscKmsService } from './services/bsc.kms'
import { bscTxService } from './services/bsc.tx'
Expand Down
4 changes: 2 additions & 2 deletions packages/blockchain/btc/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tatumio/btc",
"version": "0.0.1",
"type": "commonjs"
"version": "v2.0.1-alpha.203",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/btc/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"executor": "@nrwl/node:package",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/blockchain/btc",
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/btc/src/lib/__tests__/btc.tx.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as apiClient from '@tatumio/api-client'
import { BtcTransactionFromAddress, BtcTransactionFromUTXO, BtcTx } from '@tatumio/api-client'
import { btcTransactions } from '../transaction/btc.tx'
import { btcBasedTxTestFactory, mockHelper } from '@tatumio/shared-testing'
import { amountUtils } from '@tatumio/abstract-sdk'
import { amountUtils } from '@tatumio/shared-abstract-sdk'

jest.mock('@tatumio/api-client')
const mockedApi = mockHelper.mockApi(apiClient)
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/btc/src/lib/btc.sdk.errors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SdkError, SdkErrorCode } from '@tatumio/abstract-sdk'
import { SdkError, SdkErrorCode } from '@tatumio/shared-abstract-sdk'

/**
* https://github.com/bitpay/bitcore/blob/v8.0.0/packages/bitcore-lib/lib/errors/spec.js
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/btc/src/lib/btc.sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Blockchain } from '@tatumio/shared-core'
import { btcBasedSdk } from '@tatumio/shared-blockchain-btc-based'
import { BlockchainBitcoinService } from '@tatumio/api-client'
import { btcTransactions } from './transaction/btc.tx'
import { SDKArguments } from '@tatumio/abstract-sdk'
import { SDKArguments } from '@tatumio/shared-abstract-sdk'

const blockchain = Blockchain.BTC

Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/btc/src/lib/transaction/btc.tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
BtcTransactionFromUTXOKMS,
TransactionHashKMS,
} from '@tatumio/api-client'
import { amountUtils, SdkErrorCode } from '@tatumio/abstract-sdk'
import { amountUtils, SdkErrorCode } from '@tatumio/shared-abstract-sdk'
import { BtcSdkError } from '../btc.sdk.errors'
import { BtcBasedTx } from '@tatumio/shared-blockchain-btc-based'

Expand Down
3 changes: 2 additions & 1 deletion packages/blockchain/celo/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "@tatumio/celo",
"version": "0.0.1"
"version": "v2.0.1-alpha.203",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/celo/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"executor": "@nrwl/node:package",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/blockchain/celo",
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/celo/src/lib/celo.sdk.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Blockchain, Web3Request, Web3Response } from '@tatumio/shared-core'
import { SDKArguments } from '@tatumio/abstract-sdk'
import { SDKArguments } from '@tatumio/shared-abstract-sdk'
import { BlockchainCeloService } from '@tatumio/api-client'
import { celoWeb3 } from './services/celo.web3'
import { evmBasedSdk } from '@tatumio/shared-blockchain-evm-based'
Expand Down
3 changes: 2 additions & 1 deletion packages/blockchain/doge/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "@tatumio/doge",
"version": "0.0.1"
"version": "v2.0.1-alpha.203",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/doge/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"executor": "@nrwl/node:package",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/blockchain/doge",
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/doge/src/lib/doge.sdk.errors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SdkError, SdkErrorCode } from '@tatumio/abstract-sdk'
import { SdkError, SdkErrorCode } from '@tatumio/shared-abstract-sdk'

export const DOGE_ERRORS_MAPPING = {
'dogecore.ErrorTransactionFeeErrorTooSmall': SdkErrorCode.BTC_FEE_TOO_SMALL,
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/doge/src/lib/doge.sdk.tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
TransactionHashKMS,
} from '@tatumio/api-client'
import { BtcBasedTx } from '@tatumio/shared-blockchain-btc-based'
import { amountUtils } from '@tatumio/abstract-sdk'
import { amountUtils } from '@tatumio/shared-abstract-sdk'
import { DogeSdkError } from './doge.sdk.errors'

export type DogeTransaction = DogeTransactionUTXO | DogeTransactionUTXOKMS
Expand Down
3 changes: 2 additions & 1 deletion packages/blockchain/eth/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "@tatumio/eth",
"version": "0.0.1"
"version": "v2.0.1-alpha.203",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion packages/blockchain/eth/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"executor": "@nrwl/node:package",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/blockchain/eth",
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/eth/src/lib/eth.sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BlockchainEthereumService } from '@tatumio/api-client'
import { ethWeb3 } from './services/eth.web3'
import { ethKmsService } from './services/eth.kms'
import { ethTx } from './services/eth.tx'
import { SDKArguments } from '@tatumio/abstract-sdk'
import { SDKArguments } from '@tatumio/shared-abstract-sdk'

const blockchain = Blockchain.ETH

Expand Down
3 changes: 2 additions & 1 deletion packages/blockchain/kcs/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "@tatumio/kcs",
"version": "0.0.1"
"version": "v2.0.1-alpha.203",
"license": "MIT"
}
Loading

0 comments on commit db9b7bd

Please sign in to comment.