Skip to content

Commit 50a0cf1

Browse files
fix(ci): fix GitHub Packages (GPR) publish registry setup, fallback error handling, and update READMEs with GPR install options
1 parent 0810cf5 commit 50a0cf1

3 files changed

Lines changed: 90 additions & 46 deletions

File tree

.github/workflows/release.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,18 +164,32 @@ jobs:
164164
git tag ${{ needs.version.outputs.tag }}
165165
git push origin HEAD:main ${{ needs.version.outputs.tag }}
166166
167-
- uses: actions/setup-node@v4
167+
- name: Setup npm registry
168+
uses: actions/setup-node@v4
168169
with:
169170
node-version: '22'
170171
registry-url: 'https://registry.npmjs.org'
171172
cache: npm
172173
cache-dependency-path: cloudsync-cli/package-lock.json
173-
- run: npm ci
174-
- run: npm publish --access public
174+
175+
- name: Install dependencies
176+
run: npm ci
177+
178+
- name: Publish to npm
179+
continue-on-error: true
180+
run: npm publish --access public
175181
env:
176182
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
177183

178-
- name: Publish to GPR
184+
- name: Setup GitHub Package Registry
185+
uses: actions/setup-node@v4
186+
with:
187+
node-version: '22'
188+
registry-url: 'https://npm.pkg.github.com'
189+
scope: '@tech4file'
190+
191+
- name: Publish to GPR (GitHub Packages)
192+
continue-on-error: true
179193
run: |
180194
npm pkg set name="@tech4file/cloudsync-cli"
181195
npm publish --access public
@@ -188,7 +202,8 @@ jobs:
188202
find . -type f ! -name '*.zip' ! -name '*.bat' ! -name '*.iss' ! -name '*.md' ! -name 'LICENSE' \
189203
-exec sha256sum {} \; > checksums.txt
190204
191-
- uses: softprops/action-gh-release@v1
205+
- name: GitHub Release
206+
uses: softprops/action-gh-release@v2
192207
with:
193208
tag_name: ${{ needs.version.outputs.tag }}
194209
name: ${{ needs.version.outputs.version }}

README.md

Lines changed: 61 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,68 +2,93 @@
22

33
<div align="center">
44

5-
[![GitHub license](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)](LICENSE)
6-
[![npm version](https://img.shields.io/npm/v/cloudsync-cli.svg?style=for-the-badge)](https://www.npmjs.com/package/cloudsync-cli)
7-
[![GitHub Actions CI](https://img.shields.io/github/actions/workflow/status/Tech4File/cloudsync-cli/ci.yml?style=for-the-badge&branch=main)](https://github.com/Tech4File/cloudsync-cli/actions)
5+
[![npm version](https://img.shields.io/npm/v/cloudsync-cli.svg?style=for-the-badge&color=cb3837)](https://www.npmjs.com/package/cloudsync-cli)
6+
[![GitHub Packages](https://img.shields.io/badge/GitHub%20Packages-@tech4file/cloudsync--cli-blue?style=for-the-badge&logo=github)](https://github.com/Tech4File/cloudsync-cli/packages)
7+
[![GitHub release](https://img.shields.io/github/v/release/Tech4File/cloudsync-cli?style=for-the-badge&color=2da44e)](https://github.com/Tech4File/cloudsync-cli/releases)
8+
[![License](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)](LICENSE)
9+
[![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen?style=for-the-badge)](https://nodejs.org/)
10+
[![GitHub Actions CI](https://img.shields.io/github/actions/workflow/status/Tech4File/cloudsync-cli/ci.yml?style=for-the-badge&branch=main&label=CI)](https://github.com/Tech4File/cloudsync-cli/actions)
811

9-
**Secure, Git-like version control CLI for synchronizing files between local and remote environments over encrypted SSH tunnels.**
12+
**An open-source, Git-like version control CLI for secure cloud-to-local synchronization via encrypted SSH tunnels.**
13+
14+
*"Your configs, your cloud, your rules — no public repos required."*
1015

1116
</div>
1217

1318
---
1419

15-
## What is CloudSync-CLI?
16-
17-
CloudSync-CLI is a cross-platform command-line tool that brings Git-like version control (stage, commit, history, diff, rollback) to configuration files and sensitive data — syncing them directly between machines over encrypted tunnels without ever touching a public repository.
20+
## 🚀 Quick Installation
1821

19-
**10 transport protocols.** **Git-like VCS.** **Zero public exposure.**
20-
21-
---
22+
### Option 1: Install via npm (Global CLI)
23+
```bash
24+
npm install -g cloudsync-cli
25+
```
2226

23-
## Repository Structure
27+
### Option 2: Install via GitHub Packages (GPR)
28+
```bash
29+
npm install -g @tech4file/cloudsync-cli --registry=https://npm.pkg.github.com
30+
```
2431

25-
| Path | Description |
26-
|---|---|
27-
| `cloudsync-cli/` | The npm package — CLI source, commands, transport engine, VCS |
28-
| `.github/workflows/ci.yml` | CI pipeline — tests on Ubuntu (18/20/22) + Windows + macOS |
29-
| `.github/workflows/release.yml` | Auto-release on tag push — builds Win/Mac/Linux binaries + npm + GPR |
32+
### Option 3: Download Standalone Binaries (Windows / Linux / macOS)
33+
Download single-executable binaries directly from the latest [GitHub Releases](https://github.com/Tech4File/cloudsync-cli/releases):
34+
- 🪟 `cloudsync.exe` / `cloudsync-windows-x64.zip` (Windows)
35+
- 🐧 `cloudsync` (Linux x64)
36+
- 🍏 `cloudsync` (macOS x64 / ARM64)
3037

3138
---
3239

33-
## Quick Start
40+
## 📋 Quick Start
3441

3542
```bash
36-
npm install -g cloudsync-cli
37-
cloudsync init --host your-server.com --user username
43+
# 1. Initialize configuration
44+
cloudsync init --host your-server.com --user username --port 22
45+
46+
# 2. Stage files for version control
3847
cloudsync stage .env config.json
39-
cloudsync commit "Update config"
40-
cloudsync upload --include .env --exclude node_modules
41-
cloudsync --help
48+
49+
# 3. Commit staged changes locally
50+
cloudsync commit "Update database config"
51+
52+
# 4. Securely upload to remote target
53+
cloudsync upload --profile default
54+
55+
# 5. Check operational health & network connectivity
56+
cloudsync doctor
4257
```
4358

44-
Full docs: [cloudsync-cli/README.md](cloudsync-cli/README.md)
59+
Full documentation & CLI command reference: [cloudsync-cli/README.md](cloudsync-cli/README.md)
4560

4661
---
4762

48-
## Automated CI/CD
63+
## 📁 Repository Structure
4964

50-
| Trigger | What Happens |
65+
| Path | Description |
5166
|---|---|
52-
| Push to `main` / PR | `ci.yml` — tests Ubuntu (18/20/22) + Windows + macOS + security |
53-
| Push version tag `v1.0.6` | `release.yml` — tests → builds EXEs → npm publish → GPR publish → GitHub Release |
67+
| [`cloudsync-cli/`](cloudsync-cli/) | The npm package directory containing CLI source, commands, transport engine, and VCS modules. |
68+
| [`.github/workflows/ci.yml`](.github/workflows/ci.yml) | Continuous Integration matrix testing Node 18, 20, 22 on Ubuntu, Windows, and macOS. |
69+
| [`.github/workflows/release.yml`](.github/workflows/release.yml) | Automated build & publication pipeline — produces standalone binaries, releases to npmjs, publishes to GitHub Packages (GPR), and creates GitHub Releases. |
70+
71+
---
5472

55-
**No `npm publish` locally. Everything automated.**
73+
## ⚙️ Automated CI/CD Pipeline
74+
75+
| Pipeline | Trigger | Automated Operations |
76+
|---|---|---|
77+
| **CI Matrix** (`ci.yml`) | Push / PR to `main` | Runs multi-OS test matrix across Node.js 18, 20, and 22. |
78+
| **Release Pipeline** (`release.yml`) | Push to `main` | Runs test suite $\rightarrow$ builds bundles $\rightarrow$ compiles standalone EXEs/binaries $\rightarrow$ publishes to npmjs $\rightarrow$ publishes to GPR $\rightarrow$ generates GitHub Release with SHA-256 checksums. |
5679

5780
---
5881

59-
## Development
82+
## 🛡️ Security & Hardening Highlights
6083

61-
```bash
62-
git clone https://github.com/Tech4File/cloudsync-cli.git
63-
cd cloudsync-cli/cloudsync-cli
64-
npm install && npm test
65-
```
84+
- **Zero-Dependency Security Core**: Hardened with prototype pollution protection (`safeJsonParse`), path traversal filtering (`safePath`), and SSRF-safe hostname validation.
85+
- **Encrypted SSH Channels**: Native `ssh2` transport layer supporting keypair auth, custom ports, and SCP/SFTP/RSYNC protocols.
86+
- **HTTP Share Server Security**: Built-in HTTP sharing with rate limiting (60 req/min), CORS restriction, and security headers (`CSP`, `X-Frame-Options: DENY`, `X-Content-Type-Options: nosniff`).
87+
88+
---
89+
90+
## 📄 License
6691

67-
## License
92+
Distributed under the **MIT License**. See [LICENSE](LICENSE) for details.
6893

69-
MIT — [LICENSE](LICENSE) | [Security policy](cloudsync-cli/SECURITY.md) | [Contributing](cloudsync-cli/CONTRIBUTING.md)
94+
Security Policy: [SECURITY.md](cloudsync-cli/SECURITY.md) | Contributing Guidelines: [CONTRIBUTING.md](cloudsync-cli/CONTRIBUTING.md)

cloudsync-cli/README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,21 @@ CloudSync-CLI brings **Git-like version control** to sensitive configuration fil
8282

8383
---
8484

85-
## 📥 Installation
86-
87-
### Via npm (Global)
85+
### Via npm (Global - npmjs.org)
8886

8987
```bash
9088
npm install -g cloudsync-cli
9189
```
9290

93-
### Via Windows Installer
91+
### Via GitHub Packages (GPR)
92+
93+
```bash
94+
npm install -g @tech4file/cloudsync-cli --registry=https://npm.pkg.github.com
95+
```
96+
97+
### Standalone Executable Binaries (Windows / Linux / macOS)
9498

95-
Download `CloudSync-Setup.exe` from our [releases page](https://github.com/Tech4File/cloudsync-cli/releases) and run the installer.
99+
Download pre-compiled single-executable binaries (`cloudsync.exe`, `cloudsync` Linux/macOS) directly from the [GitHub Releases Page](https://github.com/Tech4File/cloudsync-cli/releases).
96100

97101
### Verify Installation
98102

0 commit comments

Comments
 (0)