diff --git a/.github/workflows/changeset-publish.yml b/.github/workflows/changeset-publish.yml index 7a9d374..0b522da 100644 --- a/.github/workflows/changeset-publish.yml +++ b/.github/workflows/changeset-publish.yml @@ -1,8 +1,9 @@ -name: Release +name: Publish on: - push: - branches: - - main + workflow_run: + workflows: [CI] + branches: [main] + types: [completed] concurrency: ${{ github.workflow }}-${{ github.ref }} @@ -11,8 +12,8 @@ permissions: pull-requests: write jobs: - release: - name: Release + publish: + if: ${{ github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-latest steps: - name: Action checkout @@ -33,15 +34,17 @@ jobs: - name: Installing dependencies run: yarn install - - name: tsc Linting and Build + - name: tsc Linting working-directory: lib/js-sdk - run: yarn lint && yarn build + run: yarn lint - name: Create Release Pull Request or Publish id: changesets uses: changesets/action@v1 with: - publish: yarn publish + publish: yarn release + cwd: lib/js-sdk env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_TOKEN: ${{ secrets.npm_token2 }} + NODE_AUTH_TOKEN: ${{secrets.npm_token2}} diff --git a/example/webapp b/example/webapp index 64c97ec..a9096cf 160000 --- a/example/webapp +++ b/example/webapp @@ -1 +1 @@ -Subproject commit 64c97ecd84df06dbc2db9fc11968c578a1239c5f +Subproject commit a9096cf78a5837d8e9c77fbe101a506ffc123221 diff --git a/.changeset/README.md b/lib/js-sdk/.changeset/README.md similarity index 100% rename from .changeset/README.md rename to lib/js-sdk/.changeset/README.md diff --git a/.changeset/config.json b/lib/js-sdk/.changeset/config.json similarity index 100% rename from .changeset/config.json rename to lib/js-sdk/.changeset/config.json diff --git a/lib/js-sdk/.changeset/wicked-otters-walk.md b/lib/js-sdk/.changeset/wicked-otters-walk.md new file mode 100644 index 0000000..0f355af --- /dev/null +++ b/lib/js-sdk/.changeset/wicked-otters-walk.md @@ -0,0 +1,5 @@ +--- +"@zerochain/zus-sdk": minor +--- + +add TS support diff --git a/lib/js-sdk/package.json b/lib/js-sdk/package.json index d0b0866..7c1dc75 100644 --- a/lib/js-sdk/package.json +++ b/lib/js-sdk/package.json @@ -8,8 +8,7 @@ "build": "tsc", "build:tsup": "tsup src/index.ts --format cjs,esm --dts", "lint": "tsc --noEmit", - "publish": "yarn changeset publish", - "buildpub": "yarn build && yarn publish", + "release": "yarn build && yarn changeset publish", "version": "yarn changeset" }, "main": "dist/index.js", diff --git a/package.json b/package.json index 5304b3c..7eb471c 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "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", + "version": "cd ./lib/js-sdk && yarn version" }, "devDependencies": { "concurrently": "^8.2.2"