From ba3c658646c09b0f9490f9c5ea650440413b96c6 Mon Sep 17 00:00:00 2001 From: Ashutosh Khanduala Date: Thu, 9 May 2024 11:45:42 +0530 Subject: [PATCH 1/4] changeset publish action changes --- .github/workflows/changeset-publish.yml | 22 ++++++++++----------- example/webapp | 2 +- lib/js-sdk/.changeset/many-steaks-care.md | 5 +++++ lib/js-sdk/.changeset/wicked-otters-walk.md | 5 ----- lib/js-sdk/package.json | 3 ++- package.json | 3 +-- 6 files changed, 19 insertions(+), 21 deletions(-) create mode 100644 lib/js-sdk/.changeset/many-steaks-care.md delete mode 100644 lib/js-sdk/.changeset/wicked-otters-walk.md diff --git a/.github/workflows/changeset-publish.yml b/.github/workflows/changeset-publish.yml index 0b522da..9f65088 100644 --- a/.github/workflows/changeset-publish.yml +++ b/.github/workflows/changeset-publish.yml @@ -1,9 +1,8 @@ -name: Publish +name: Release on: - workflow_run: - workflows: [CI] - branches: [main] - types: [completed] + push: + branches: + - main concurrency: ${{ github.workflow }}-${{ github.ref }} @@ -12,8 +11,8 @@ permissions: pull-requests: write jobs: - publish: - if: ${{ github.event.workflow_run.conclusion == 'success' }} + release: + name: Release runs-on: ubuntu-latest steps: - name: Action checkout @@ -34,17 +33,16 @@ jobs: - name: Installing dependencies run: yarn install - - name: tsc Linting + - name: tsc Linting and Build working-directory: lib/js-sdk - run: yarn lint + run: yarn lint && yarn build - name: Create Release Pull Request or Publish id: changesets uses: changesets/action@v1 with: - publish: yarn release + publish: yarn publish cwd: lib/js-sdk env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.npm_token2 }} - NODE_AUTH_TOKEN: ${{secrets.npm_token2}} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/example/webapp b/example/webapp index a9096cf..64c97ec 160000 --- a/example/webapp +++ b/example/webapp @@ -1 +1 @@ -Subproject commit a9096cf78a5837d8e9c77fbe101a506ffc123221 +Subproject commit 64c97ecd84df06dbc2db9fc11968c578a1239c5f diff --git a/lib/js-sdk/.changeset/many-steaks-care.md b/lib/js-sdk/.changeset/many-steaks-care.md new file mode 100644 index 0000000..22dfc3a --- /dev/null +++ b/lib/js-sdk/.changeset/many-steaks-care.md @@ -0,0 +1,5 @@ +--- +"@zerochain/zus-sdk": patch +--- + +Package.json changes diff --git a/lib/js-sdk/.changeset/wicked-otters-walk.md b/lib/js-sdk/.changeset/wicked-otters-walk.md deleted file mode 100644 index 0f355af..0000000 --- a/lib/js-sdk/.changeset/wicked-otters-walk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@zerochain/zus-sdk": minor ---- - -add TS support diff --git a/lib/js-sdk/package.json b/lib/js-sdk/package.json index 7c1dc75..d0b0866 100644 --- a/lib/js-sdk/package.json +++ b/lib/js-sdk/package.json @@ -8,7 +8,8 @@ "build": "tsc", "build:tsup": "tsup src/index.ts --format cjs,esm --dts", "lint": "tsc --noEmit", - "release": "yarn build && yarn changeset publish", + "publish": "yarn changeset publish", + "buildpub": "yarn build && yarn publish", "version": "yarn changeset" }, "main": "dist/index.js", diff --git a/package.json b/package.json index 7eb471c..5304b3c 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,7 @@ "dev": "concurrently \"yarn dev:app\" \"yarn dev:lib\"", "build:app": "cd ./example/webapp && yarn build", "build:lib": "cd ./lib/js-sdk && yarn build", - "build": "yarn build:app && yarn build:lib", - "version": "cd ./lib/js-sdk && yarn version" + "build": "yarn build:app && yarn build:lib" }, "devDependencies": { "concurrently": "^8.2.2" From fdf74397e7be629a6c0b5c49d1087b348d7084f8 Mon Sep 17 00:00:00 2001 From: Ashutosh Khanduala Date: Thu, 9 May 2024 11:52:01 +0530 Subject: [PATCH 2/4] mv changset folder to root --- {lib/js-sdk/.changeset => .changeset}/README.md | 0 {lib/js-sdk/.changeset => .changeset}/config.json | 0 lib/js-sdk/.changeset/many-steaks-care.md | 5 ----- 3 files changed, 5 deletions(-) rename {lib/js-sdk/.changeset => .changeset}/README.md (100%) rename {lib/js-sdk/.changeset => .changeset}/config.json (100%) delete mode 100644 lib/js-sdk/.changeset/many-steaks-care.md diff --git a/lib/js-sdk/.changeset/README.md b/.changeset/README.md similarity index 100% rename from lib/js-sdk/.changeset/README.md rename to .changeset/README.md diff --git a/lib/js-sdk/.changeset/config.json b/.changeset/config.json similarity index 100% rename from lib/js-sdk/.changeset/config.json rename to .changeset/config.json diff --git a/lib/js-sdk/.changeset/many-steaks-care.md b/lib/js-sdk/.changeset/many-steaks-care.md deleted file mode 100644 index 22dfc3a..0000000 --- a/lib/js-sdk/.changeset/many-steaks-care.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@zerochain/zus-sdk": patch ---- - -Package.json changes From b9a75ae0620c81862293e00b65e3a4543c41134a Mon Sep 17 00:00:00 2001 From: Ashutosh Khanduala Date: Thu, 9 May 2024 11:58:42 +0530 Subject: [PATCH 3/4] add changesets --- .changeset/seven-drinks-learn.md | 5 +++++ .github/workflows/changeset-publish.yml | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .changeset/seven-drinks-learn.md diff --git a/.changeset/seven-drinks-learn.md b/.changeset/seven-drinks-learn.md new file mode 100644 index 0000000..22dfc3a --- /dev/null +++ b/.changeset/seven-drinks-learn.md @@ -0,0 +1,5 @@ +--- +"@zerochain/zus-sdk": patch +--- + +Package.json changes diff --git a/.github/workflows/changeset-publish.yml b/.github/workflows/changeset-publish.yml index 9f65088..7a9d374 100644 --- a/.github/workflows/changeset-publish.yml +++ b/.github/workflows/changeset-publish.yml @@ -42,7 +42,6 @@ jobs: uses: changesets/action@v1 with: publish: yarn publish - cwd: lib/js-sdk env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} From 218373ca3cad5766bf71fd0a75bc893b0b8d79dc Mon Sep 17 00:00:00 2001 From: Ashutosh Khanduala Date: Thu, 9 May 2024 12:23:20 +0530 Subject: [PATCH 4/4] mv changesets cli package to root --- lib/js-sdk/package.json | 1 - package.json | 4 +++- yarn.lock | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/js-sdk/package.json b/lib/js-sdk/package.json index d0b0866..8405b76 100644 --- a/lib/js-sdk/package.json +++ b/lib/js-sdk/package.json @@ -37,7 +37,6 @@ "access": "public" }, "devDependencies": { - "@changesets/cli": "^2.27.1", "@types/bluebird": "^3.5.42", "@types/json-bigint": "^1.0.4", "tsup": "^6.5.0", diff --git a/package.json b/package.json index 5304b3c..536d315 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,11 @@ "dev": "concurrently \"yarn dev:app\" \"yarn dev:lib\"", "build:app": "cd ./example/webapp && yarn build", "build:lib": "cd ./lib/js-sdk && yarn build", - "build": "yarn build:app && yarn build:lib" + "build": "yarn build:app && yarn build:lib", + "publish": "yarn changeset publish" }, "devDependencies": { + "@changesets/cli": "^2.27.1", "concurrently": "^8.2.2" }, "packageManager": "yarn@4.2.1" diff --git a/yarn.lock b/yarn.lock index 8d97346..376a6d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1161,7 +1161,6 @@ __metadata: version: 0.0.0-use.local resolution: "@zerochain/zus-sdk@workspace:lib/js-sdk" dependencies: - "@changesets/cli": "npm:^2.27.1" "@types/bluebird": "npm:^3.5.42" "@types/json-bigint": "npm:^1.0.4" axios: "npm:^1.2.0" @@ -8035,6 +8034,7 @@ __metadata: version: 0.0.0-use.local resolution: "zus-js-sdk@workspace:." dependencies: + "@changesets/cli": "npm:^2.27.1" concurrently: "npm:^8.2.2" languageName: unknown linkType: soft