Skip to content

Commit 60864f0

Browse files
committed
chore: client-SDK publish
1 parent 32cd52f commit 60864f0

File tree

5 files changed

+55
-3
lines changed

5 files changed

+55
-3
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: Build and Deploy
22
on:
33
push:
44
paths:
5-
- frontend/**
6-
- client-sdk/**
5+
- frontend/**
76

87
permissions:
98
contents: write

.github/workflows/publish-sdk.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and Publish SDK NPM Package
2+
on:
3+
push:
4+
branches: [main]
5+
paths:
6+
- client-sdk/**
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
packages: write
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Install dependencies
20+
run: |
21+
cd client-sdk
22+
npm ci
23+
24+
# - name: Run Tests
25+
# run: npm test
26+
# continue-on-error: true
27+
28+
- name: Build TypeScript application
29+
run: |
30+
cd client-sdk
31+
npm run build
32+
33+
- name: Increment version and publish to GitHub npm package registry
34+
env:
35+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
36+
run: |
37+
cd client-sdk
38+
NEW_VERSION=$(npm version patch --no-git-tag-version)
39+
git config user.name "github-actions[bot]"
40+
git config user.email "github-actions[bot]@users.noreply.github.com"
41+
git add package.json
42+
git commit -m "chore(release SDK): $NEW_VERSION"
43+
git push origin HEAD:main
44+
npm publish

client-sdk/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-sdk/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
"name": "transfer-scheduler-sdk",
33
"version": "1.0.0",
44
"main": "dist/index.js",
5+
"repository": {
6+
"type": "git",
7+
"url": "git+https://github.com/mnrgreg/TransferScheduler.git"
8+
},
9+
"publishConfig": {
10+
"@mnrgreg:registry": "https://npm.pkg.github.com"
11+
},
12+
"author": "Gregory May",
13+
"license": "MIT",
514
"scripts": {
615
"build": "tsc",
716
"watch": "tsc -w",

0 commit comments

Comments
 (0)