Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

Commit

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

Expand All @@ -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
Expand All @@ -34,17 +33,15 @@ 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
cwd: lib/js-sdk
publish: yarn publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.npm_token2 }}
NODE_AUTH_TOKEN: ${{secrets.npm_token2}}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion example/webapp
Submodule webapp updated 4 files
+2 −0 .gitignore
+1,102 −1,102 dist/assets.js
+1,102 −1,102 dist/main.js
+1 −0 package.json
5 changes: 0 additions & 5 deletions lib/js-sdk/.changeset/wicked-otters-walk.md

This file was deleted.

4 changes: 2 additions & 2 deletions lib/js-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -36,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",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
"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"
"publish": "yarn changeset publish"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"concurrently": "^8.2.2"
},
"packageManager": "[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 79c88df

Please sign in to comment.