Skip to content

Commit e72f4a5

Browse files
committed
Merge branch 'master' of github.com:profullstack/coinpayportal
2 parents 752a1ad + 38b272f commit e72f4a5

File tree

277 files changed

+57380
-3845
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

277 files changed

+57380
-3845
lines changed

.github/workflows/npm-publish.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Publish SDK to npm
2+
3+
on:
4+
push:
5+
branches: [master]
6+
paths:
7+
- 'packages/sdk/**'
8+
workflow_dispatch:
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
working-directory: packages/sdk
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: '22'
23+
registry-url: 'https://registry.npmjs.org'
24+
25+
- name: Install dependencies
26+
run: npm install
27+
28+
- name: Check if version already published
29+
id: check
30+
run: |
31+
CURRENT=$(node -p "require('./package.json').version")
32+
echo "version=$CURRENT" >> "$GITHUB_OUTPUT"
33+
if npm view "@profullstack/coinpay@$CURRENT" version 2>/dev/null; then
34+
echo "published=true" >> "$GITHUB_OUTPUT"
35+
echo "⏭️ v$CURRENT already on npm — skipping publish"
36+
else
37+
echo "published=false" >> "$GITHUB_OUTPUT"
38+
echo "📦 v$CURRENT not on npm — will publish"
39+
fi
40+
41+
- name: Build (if build script exists)
42+
if: steps.check.outputs.published == 'false'
43+
run: npm run build --if-present
44+
45+
- name: Publish to npm
46+
if: steps.check.outputs.published == 'false'
47+
env:
48+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49+
run: npm publish --access public --ignore-scripts
50+
51+
- name: Summary
52+
run: |
53+
if [ "${{ steps.check.outputs.published }}" == "true" ]; then
54+
echo "### ⏭️ Skipped — v${{ steps.check.outputs.version }} already published" >> "$GITHUB_STEP_SUMMARY"
55+
else
56+
echo "### ✅ Published @profullstack/coinpay@${{ steps.check.outputs.version }}" >> "$GITHUB_STEP_SUMMARY"
57+
fi

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ next-env.d.ts
4242

4343
# Wallet backups (encrypted)
4444
backups/
45+
packages/sdk/node_modules/

0 commit comments

Comments
 (0)