Skip to content

Commit a513f46

Browse files
fix: add proper package.json for NPM publishing
1 parent 40a7288 commit a513f46

2 files changed

Lines changed: 18 additions & 39 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -47,44 +47,6 @@ jobs:
4747
registry-url: 'https://registry.npmjs.org'
4848

4949
- name: Publish to NPM
50-
run: |
51-
VERSION=${GITHUB_REF#refs/tags/v}
52-
cat <<EOF > package.json
53-
{
54-
"name": "fcemail",
55-
"version": "${VERSION}",
56-
"description": "FreeCustom.Email CLI — Manage disposable inboxes from your terminal.",
57-
"bin": {
58-
"fce": "bin/fce"
59-
},
60-
"scripts": {
61-
"postinstall": "node scripts/install-binary.js"
62-
},
63-
"repository": {
64-
"type": "git",
65-
"url": "git+https://github.com/DishIs/fce-cli.git"
66-
},
67-
"author": "DishIs",
68-
"license": "MIT"
69-
}
70-
EOF
71-
# Create a minimal install script for NPM users
72-
mkdir -p bin
73-
touch bin/fce
74-
mkdir -p scripts
75-
cat <<EOF > scripts/install-binary.js
76-
const { execSync } = require('child_process');
77-
const fs = require('fs');
78-
const path = require('path');
79-
80-
console.log('Downloading fce-cli binary...');
81-
try {
82-
execSync('curl -fsSL https://raw.githubusercontent.com/DishIs/fce-cli/main/scripts/install.sh | BIN_DIR=./bin sh');
83-
} catch (err) {
84-
console.error('Failed to download binary:', err.message);
85-
process.exit(1);
86-
}
87-
EOF
88-
npm publish --access public
50+
run: npm publish --access public
8951
env:
9052
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "fcemail",
3+
"version": "0.2.1",
4+
"description": "FreeCustom.Email CLI — Manage disposable inboxes from your terminal.",
5+
"bin": {
6+
"fce": "bin/fce"
7+
},
8+
"scripts": {
9+
"postinstall": "node scripts/install-binary.js"
10+
},
11+
"repository": {
12+
"type": "git",
13+
"url": "git+https://github.com/DishIs/fce-cli.git"
14+
},
15+
"author": "DishIs",
16+
"license": "MIT"
17+
}

0 commit comments

Comments
 (0)