Skip to content

Commit be9ffa3

Browse files
Hugo PerezHugo Perez
authored andcommitted
ci: switch package publishing to GitHub Packages
- Add publishConfig to package.json to use GitHub Packages registry - Remove NPM_TOKEN from release workflow as it's no longer needed - Update README with GitHub Packages installation instructions
1 parent ccd050a commit be9ffa3

File tree

3 files changed

+35
-16
lines changed

3 files changed

+35
-16
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,4 @@ jobs:
3232
- name: Release
3333
env:
3434
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3635
run: npx semantic-release

README.md

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Sovereign Network API Client
22

3-
[![codecov](https://codecov.io/gh/SOVEREIGN-NET/Sovereign-Network-API-Client/branch/main/graph/badge.svg?token=CODECOV_TOKEN)](https://codecov.io/gh/SOVEREIGN-NET/Sovereign-Network-API-Client)
3+
[![codecov](https://codecov.io/gh/SOVEREIGN-NET/Sovereign-Network-API-Client/branch/main/graph/badge.svg)](https://codecov.io/gh/SOVEREIGN-NET/Sovereign-Network-API-Client)
44

55
A platform-agnostic TypeScript API client for Sovereign Network ZHTP nodes. Provides unified access to identity, wallet, DAO, smart contract, and blockchain operations across Electron, React Native, and web/Node.js environments with a single codebase.
66

@@ -16,11 +16,19 @@ A platform-agnostic TypeScript API client for Sovereign Network ZHTP nodes. Prov
1616

1717
## Installation
1818

19-
### Via NPM Registry
19+
### Via GitHub Packages
2020

21-
```bash
22-
npm install @sovereign-network/api-client
23-
```
21+
1. **Configure NPM** (one-time setup):
22+
```bash
23+
# Create or edit ~/.npmrc
24+
@sovereign-network:registry=https://npm.pkg.github.com
25+
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT
26+
```
27+
28+
2. **Install**:
29+
```bash
30+
npm install @sovereign-network/api-client
31+
```
2432

2533
## Quick Start
2634

@@ -381,18 +389,27 @@ npm run prepare # type-check + build + tests all at once
381389

382390
## Publishing
383391

384-
### Update Version
385-
```bash
386-
npm version patch # or minor, major
387-
```
392+
Publishing is **automated** via GitHub Actions on every push to `main`:
388393

389-
### Publish to NPM
390-
```bash
391-
npm login
392-
npm publish
393-
```
394+
1. **Commit with semantic messages**:
395+
- `fix:` → patch version (1.0.0 → 1.0.1)
396+
- `feat:` → minor version (1.0.0 → 1.1.0)
397+
- `BREAKING CHANGE:` → major version (1.0.0 → 2.0.0)
398+
399+
2. **Push to main**:
400+
```bash
401+
git push origin main
402+
```
403+
404+
3. **Automated workflow**:
405+
- Analyzes commits
406+
- Bumps version
407+
- Creates CHANGELOG
408+
- Publishes to GitHub Packages
409+
- Creates GitHub release
410+
- Commits back to repo
394411

395-
Requires npm account. Log in once, then publish.
412+
No manual steps needed!
396413

397414
## Project Structure
398415

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
"engines": {
6868
"node": ">=20.0.0"
6969
},
70+
"publishConfig": {
71+
"registry": "https://npm.pkg.github.com"
72+
},
7073
"devDependencies": {
7174
"@semantic-release/changelog": "^6.0.3",
7275
"@semantic-release/git": "^10.0.1",

0 commit comments

Comments
 (0)