Skip to content

Commit

Permalink
changeset publish action changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ashuvssut committed May 9, 2024
1 parent 70de076 commit 09eb8c2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 21 deletions.
22 changes: 10 additions & 12 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,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 }}
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: 5 additions & 0 deletions lib/js-sdk/.changeset/many-steaks-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zerochain/zus-sdk": patch
---

Package.json changes
5 changes: 0 additions & 5 deletions lib/js-sdk/.changeset/wicked-otters-walk.md

This file was deleted.

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

0 comments on commit 09eb8c2

Please sign in to comment.