Skip to content

Commit

Permalink
Merge pull request #72 from 0chain/revert-70-fix/publish-gha
Browse files Browse the repository at this point in the history
  • Loading branch information
ashuvssut authored May 9, 2024
2 parents 83334e3 + e54c30e commit b9e796f
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 14 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/changeset-publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}

Expand All @@ -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
Expand All @@ -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}}
2 changes: 1 addition & 1 deletion example/webapp
Submodule webapp updated 4 files
+0 −2 .gitignore
+1,102 −1,102 dist/assets.js
+1,102 −1,102 dist/main.js
+0 −1 package.json
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions lib/js-sdk/.changeset/wicked-otters-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zerochain/zus-sdk": minor
---

add TS support
3 changes: 1 addition & 2 deletions lib/js-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b9e796f

Please sign in to comment.