Skip to content

Commit 3f89a1c

Browse files
committed
Add GitHub action to automatically publish on NPM
1 parent 32899ef commit 3f89a1c

File tree

3 files changed

+64
-15
lines changed

3 files changed

+64
-15
lines changed

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish PGP Generate Package
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: '22' # Set to your desired Node.js version
20+
registry-url: 'https://registry.npmjs.org' # Use npm registry
21+
22+
- name: Install dependencies
23+
run: npm install # This installs all dependencies in your project
24+
25+
- name: Publish package to npm
26+
run: npm publish --access public # Publishes your package to npm
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Use the NPM_TOKEN secret for authentication

README.md

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,53 @@
11
# PGP-generate (pgpg)
22

3-
Simple CLI tool to generate PGP keys pair.
3+
A simple CLI tool for generating PGP key pairs.
44

55
## Installation
66

7-
`npm i -g pgp-generate`
7+
Install globally using npm:
8+
9+
```sh
10+
npm install -g pgp-generate
11+
```
812

913
## Usage
1014

11-
Run for details:
12-
```shell
15+
### Display Help
16+
17+
To see all available commands and options, run:
18+
19+
```sh
1320
pgpg --help
1421
```
1522

16-
Generate key to files {fileName}.private and {fileName}.public:
17-
```shell
18-
pgpg -n {name} -e {email} -p {secret phrase} -f {path to file}
23+
### Generate a PGP Key Pair to Files
24+
25+
Generate a PGP key pair and save it as `{fileName}.private` and `{fileName}.public`:
26+
27+
```sh
28+
pgpg -n <name> -e <email> -p <secret phrase> -f <path to file>
1929
```
2030

21-
Generate key to console:
22-
```shell
23-
pgpg -n {name} -e {email} -p {secret phrase} --print
31+
### Generate a PGP Key Pair to Console
32+
33+
Generate a PGP key pair and print it directly to the console:
34+
35+
```sh
36+
pgpg -n <name> -e <email> -p <secret phrase> --print
2437
```
2538

26-
Additional parameters:
39+
### Additional Options
40+
41+
- `-l, --level`: Sets the key security level (0, 1, 2, 3).
42+
- Default: **3** (generates a `4096-bit` key for maximum security).
43+
44+
## Contributing
45+
46+
Contributions are welcome! Feel free to fork, modify, and submit a pull request.
2747

28-
`-l, --level`: key security level (0, 1, 2, 3), default is **3** (key with `4096` length will be generated)
48+
For issues or feature requests, please open an issue.
2949

30-
## Contribution
50+
---
3151

32-
Feel free to copy and use this version. Let me know if you need any further modifications!
52+
This version makes the content clearer, improves readability, and adds professionalism. Let me know if you'd like any
53+
tweaks! 🚀

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pgp-generate",
3-
"version": "1.0.2",
3+
"version": "2.0.0",
44
"author": "Nazarii Borbiuk",
55
"license": "MIT",
66
"description": "Simple CLI tool to generate PGP keys pair",

0 commit comments

Comments
 (0)