Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.

Commit 762e922

Browse files
committed
update version, individual publish
1 parent 94b85f2 commit 762e922

File tree

2 files changed

+37
-11
lines changed

2 files changed

+37
-11
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Publish to npm
2+
23
on:
34
push:
45
branches:
@@ -8,31 +9,56 @@ on:
89
jobs:
910
publish:
1011
runs-on: ubuntu-latest
12+
1113
steps:
12-
- uses: actions/checkout@v1
13-
- uses: actions/setup-node@v1
14+
- uses: actions/checkout@v3
15+
16+
- uses: actions/setup-node@v3
1417
with:
1518
node-version: 20
16-
- run: cd ./packages/core
19+
registry-url: 'https://registry.npmjs.org'
1720

18-
- name: Create .env file
21+
- name: Set up .npmrc
1922
run: |
20-
echo "VITE_HELIUS_API_KEY=${{ secrets.VITE_HELIUS_API_KEY }}" >> .env
23+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
2124
22-
- run: cd ../../
23-
- run: yarn
24-
- run: yarn build
25+
- name: Create .env file
26+
run: echo "VITE_HELIUS_API_KEY=${{ secrets.VITE_HELIUS_API_KEY }}" >> .env
2527

26-
- name: Authenticate with npm
28+
- name: Install dependencies
29+
run: yarn
30+
31+
- name: Build all packages
32+
run: yarn build
33+
34+
- name: Detect changes in @ecency/sdk
35+
id: detect_sdk
2736
run: |
28-
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
37+
git fetch --depth=2 origin ${{ github.ref_name }}
38+
if git diff --quiet origin/${{ github.ref_name }}...HEAD -- packages/core; then
39+
echo "changed=false" >> "$GITHUB_OUTPUT"
40+
else
41+
echo "changed=true" >> "$GITHUB_OUTPUT"
42+
fi
43+
44+
- name: Detect changes in @ecency/sdk-wallets
45+
id: detect_wallets
46+
run: |
47+
git fetch --depth=2 origin ${{ github.ref_name }}
48+
if git diff --quiet origin/${{ github.ref_name }}...HEAD -- packages/wallets; then
49+
echo "changed=false" >> "$GITHUB_OUTPUT"
50+
else
51+
echo "changed=true" >> "$GITHUB_OUTPUT"
52+
fi
2953
3054
- name: Publish @ecency/sdk
55+
if: steps.detect_sdk.outputs.changed == 'true'
3156
run: |
3257
cd packages/core
3358
npm publish --access public
3459
3560
- name: Publish @ecency/sdk-wallets
61+
if: steps.detect_wallets.outputs.changed == 'true'
3662
run: |
3763
cd packages/wallets
3864
npm publish --access public

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@ecency/sdk",
33
"private": false,
4-
"version": "1.0.50",
4+
"version": "1.0.51",
55
"type": "module",
66
"license": "MIT",
77
"main": "./dist/ecency-sdk.umd.js",

0 commit comments

Comments
 (0)