huntr-cli 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +7 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +43 -0
- package/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +29 -0
- package/.github/labels.json +92 -0
- package/.github/pull_request_template.md +64 -0
- package/.github/workflows/ci.yml +87 -0
- package/.github/workflows/labels.yml +27 -0
- package/.github/workflows/manual-publish.yml +105 -0
- package/.github/workflows/publish.yml +57 -0
- package/.github/workflows/release.yml +124 -0
- package/.github/workflows/security-audit.yml +44 -0
- package/.husky/pre-commit +12 -0
- package/.husky/pre-push +27 -0
- package/.lintstagedrc.json +3 -0
- package/AGENTS.md +449 -0
- package/CHANGELOG.md +38 -0
- package/CHANGES.md +259 -0
- package/LICENSE +15 -0
- package/PUBLISHING.md +191 -0
- package/README.md +385 -0
- package/ROADMAP.md +158 -0
- package/SETUP-COMPLETE.md +446 -0
- package/WORKFLOW-SUMMARY.md +368 -0
- package/completions/_huntr +168 -0
- package/completions/huntr.1 +266 -0
- package/completions/huntr.bash +91 -0
- package/dist/api/client.d.ts +14 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +74 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/personal/activities.d.ts +20 -0
- package/dist/api/personal/activities.d.ts.map +1 -0
- package/dist/api/personal/activities.js +50 -0
- package/dist/api/personal/activities.js.map +1 -0
- package/dist/api/personal/boards.d.ts +9 -0
- package/dist/api/personal/boards.d.ts.map +1 -0
- package/dist/api/personal/boards.js +16 -0
- package/dist/api/personal/boards.js.map +1 -0
- package/dist/api/personal/index.d.ts +17 -0
- package/dist/api/personal/index.d.ts.map +1 -0
- package/dist/api/personal/index.js +37 -0
- package/dist/api/personal/index.js.map +1 -0
- package/dist/api/personal/jobs.d.ts +13 -0
- package/dist/api/personal/jobs.d.ts.map +1 -0
- package/dist/api/personal/jobs.js +31 -0
- package/dist/api/personal/jobs.js.map +1 -0
- package/dist/api/personal/user.d.ts +8 -0
- package/dist/api/personal/user.d.ts.map +1 -0
- package/dist/api/personal/user.js +13 -0
- package/dist/api/personal/user.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +501 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/capture-session.d.ts +10 -0
- package/dist/commands/capture-session.d.ts.map +1 -0
- package/dist/commands/capture-session.js +478 -0
- package/dist/commands/capture-session.js.map +1 -0
- package/dist/config/clerk-session-manager.d.ts +44 -0
- package/dist/config/clerk-session-manager.d.ts.map +1 -0
- package/dist/config/clerk-session-manager.js +232 -0
- package/dist/config/clerk-session-manager.js.map +1 -0
- package/dist/config/config-manager.d.ts +15 -0
- package/dist/config/config-manager.d.ts.map +1 -0
- package/dist/config/config-manager.js +51 -0
- package/dist/config/config-manager.js.map +1 -0
- package/dist/config/keychain-manager.d.ts +6 -0
- package/dist/config/keychain-manager.d.ts.map +1 -0
- package/dist/config/keychain-manager.js +37 -0
- package/dist/config/keychain-manager.js.map +1 -0
- package/dist/config/token-capture.d.ts +11 -0
- package/dist/config/token-capture.d.ts.map +1 -0
- package/dist/config/token-capture.js +252 -0
- package/dist/config/token-capture.js.map +1 -0
- package/dist/config/token-manager.d.ts +38 -0
- package/dist/config/token-manager.d.ts.map +1 -0
- package/dist/config/token-manager.js +153 -0
- package/dist/config/token-manager.js.map +1 -0
- package/dist/lib/list-options.d.ts +69 -0
- package/dist/lib/list-options.d.ts.map +1 -0
- package/dist/lib/list-options.js +299 -0
- package/dist/lib/list-options.js.map +1 -0
- package/dist/types/personal.d.ts +113 -0
- package/dist/types/personal.d.ts.map +1 -0
- package/dist/types/personal.js +4 -0
- package/dist/types/personal.js.map +1 -0
- package/docs/AUTOMATIC-PUBLISHING.md +520 -0
- package/docs/CHANGELOG-AUTOMATION.md +418 -0
- package/docs/CI-CD-SETUP.md +582 -0
- package/docs/DEV-SETUP.md +512 -0
- package/docs/ENHANCEMENT-PLAN.md +204 -0
- package/docs/ENTITY-TYPES.md +462 -0
- package/docs/GITHUB-ACTIONS-GUIDE.md +367 -0
- package/docs/NPM-PUBLISHING.md +324 -0
- package/docs/OUTPUT-EXAMPLES.md +414 -0
- package/docs/OUTPUT-FORMATS.md +299 -0
- package/docs/TESTING.md +216 -0
- package/eslint.config.js +68 -0
- package/package.json +64 -0
- package/src/api/client.ts +88 -0
- package/src/api/personal/activities.ts +66 -0
- package/src/api/personal/boards.ts +14 -0
- package/src/api/personal/index.ts +25 -0
- package/src/api/personal/jobs.ts +33 -0
- package/src/api/personal/user.ts +10 -0
- package/src/cli.ts +487 -0
- package/src/commands/capture-session.ts +582 -0
- package/src/config/clerk-session-manager.ts +263 -0
- package/src/config/config-manager.ts +56 -0
- package/src/config/keychain-manager.ts +30 -0
- package/src/config/token-capture.ts +233 -0
- package/src/config/token-manager.ts +139 -0
- package/src/lib/list-options.ts +370 -0
- package/src/types/personal.ts +114 -0
- package/tests/example.test.ts +130 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
export interface Board {
|
|
2
|
+
id: string;
|
|
3
|
+
_id: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
createdAt: string;
|
|
6
|
+
updatedAt?: string;
|
|
7
|
+
lists?: BoardList[];
|
|
8
|
+
}
|
|
9
|
+
export interface BoardList {
|
|
10
|
+
id: string;
|
|
11
|
+
_id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
order?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface JobCompany {
|
|
16
|
+
_id: string;
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
color?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface PersonalJob {
|
|
22
|
+
_id: string;
|
|
23
|
+
id: string;
|
|
24
|
+
title: string;
|
|
25
|
+
url?: string;
|
|
26
|
+
rootDomain?: string;
|
|
27
|
+
htmlDescription?: string;
|
|
28
|
+
_company: string;
|
|
29
|
+
_list?: string;
|
|
30
|
+
_board: string;
|
|
31
|
+
_activities?: string[];
|
|
32
|
+
_notes?: string[];
|
|
33
|
+
salary?: {
|
|
34
|
+
min?: number;
|
|
35
|
+
max?: number;
|
|
36
|
+
currency?: string;
|
|
37
|
+
};
|
|
38
|
+
location?: {
|
|
39
|
+
address?: string;
|
|
40
|
+
name?: string;
|
|
41
|
+
url?: string;
|
|
42
|
+
lat?: string;
|
|
43
|
+
lng?: string;
|
|
44
|
+
};
|
|
45
|
+
createdAt: string;
|
|
46
|
+
updatedAt?: string;
|
|
47
|
+
lastMovedAt?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface PersonalJobsResponse {
|
|
50
|
+
jobs: Record<string, PersonalJob>;
|
|
51
|
+
}
|
|
52
|
+
export interface PersonalAction {
|
|
53
|
+
_id: string;
|
|
54
|
+
id: string;
|
|
55
|
+
actionType: string;
|
|
56
|
+
date: string;
|
|
57
|
+
createdAt: string;
|
|
58
|
+
updatedAt?: string;
|
|
59
|
+
data: {
|
|
60
|
+
_job?: string;
|
|
61
|
+
_company?: string;
|
|
62
|
+
_board?: string;
|
|
63
|
+
_fromList?: string;
|
|
64
|
+
_toList?: string;
|
|
65
|
+
note?: ActionNote | null;
|
|
66
|
+
job?: {
|
|
67
|
+
_id: string;
|
|
68
|
+
id: string;
|
|
69
|
+
title: string;
|
|
70
|
+
};
|
|
71
|
+
company?: JobCompany;
|
|
72
|
+
fromList?: {
|
|
73
|
+
_id: string;
|
|
74
|
+
id: string;
|
|
75
|
+
name: string;
|
|
76
|
+
} | null;
|
|
77
|
+
toList?: {
|
|
78
|
+
_id: string;
|
|
79
|
+
id: string;
|
|
80
|
+
name: string;
|
|
81
|
+
} | null;
|
|
82
|
+
activity?: unknown;
|
|
83
|
+
activityCategory?: unknown;
|
|
84
|
+
contact?: unknown;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export interface ActionNote {
|
|
88
|
+
_id: string;
|
|
89
|
+
id: string;
|
|
90
|
+
text: string;
|
|
91
|
+
}
|
|
92
|
+
export interface PersonalActivity {
|
|
93
|
+
id: string;
|
|
94
|
+
_id: string;
|
|
95
|
+
title?: string;
|
|
96
|
+
note?: string;
|
|
97
|
+
completed: boolean;
|
|
98
|
+
completedAt?: string;
|
|
99
|
+
createdAt: string;
|
|
100
|
+
jobId?: string;
|
|
101
|
+
boardId?: string;
|
|
102
|
+
}
|
|
103
|
+
export interface UserProfile {
|
|
104
|
+
id: string;
|
|
105
|
+
_id?: string;
|
|
106
|
+
email: string;
|
|
107
|
+
givenName?: string;
|
|
108
|
+
familyName?: string;
|
|
109
|
+
firstName?: string;
|
|
110
|
+
lastName?: string;
|
|
111
|
+
createdAt: string;
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=personal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personal.d.ts","sourceRoot":"","sources":["../../src/types/personal.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAGD,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAGD,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM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C;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personal.js","sourceRoot":"","sources":["../../src/types/personal.ts"],"names":[],"mappings":";AAAA,0DAA0D"}
|
|
@@ -0,0 +1,520 @@
|
|
|
1
|
+
# Automatic Publishing Guide
|
|
2
|
+
|
|
3
|
+
Complete guide to huntr-cli's automatic release and publishing workflow.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Publishing is **completely automated** once you bump the version and merge to main:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
git checkout main
|
|
11
|
+
npm version minor # 1.0.0 → 1.1.0
|
|
12
|
+
git push origin main
|
|
13
|
+
# ↓
|
|
14
|
+
GitHub Release created automatically
|
|
15
|
+
↓
|
|
16
|
+
npm published automatically
|
|
17
|
+
↓
|
|
18
|
+
Artifacts uploaded
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Workflow Architecture
|
|
22
|
+
|
|
23
|
+
### Release Workflow (`.github/workflows/release.yml`)
|
|
24
|
+
|
|
25
|
+
Triggers when version is bumped on main branch.
|
|
26
|
+
|
|
27
|
+
**What it does:**
|
|
28
|
+
1. Detects version change in package.json
|
|
29
|
+
2. Runs full CI (lint, typecheck, build)
|
|
30
|
+
3. Creates tar.gz and zip archives
|
|
31
|
+
4. Creates git tag (`v1.1.0`)
|
|
32
|
+
5. Creates GitHub Release with changelog
|
|
33
|
+
6. Uploads distribution artifacts
|
|
34
|
+
7. Triggers publish workflow
|
|
35
|
+
|
|
36
|
+
### Publish Workflow (`.github/workflows/publish.yml`)
|
|
37
|
+
|
|
38
|
+
Triggers when GitHub Release is published.
|
|
39
|
+
|
|
40
|
+
**What it does:**
|
|
41
|
+
1. Runs full CI pipeline
|
|
42
|
+
2. Publishes to npm registry
|
|
43
|
+
3. Comments on release with npm URL
|
|
44
|
+
|
|
45
|
+
## Publishing Methods
|
|
46
|
+
|
|
47
|
+
### Method 1: Automatic (Recommended)
|
|
48
|
+
|
|
49
|
+
**Simplest method** — Everything is automatic after version bump!
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# 1. On main branch
|
|
53
|
+
git checkout main
|
|
54
|
+
git pull origin main
|
|
55
|
+
|
|
56
|
+
# 2. Bump version (creates commit with git tag)
|
|
57
|
+
npm version minor # 1.0.0 → 1.1.0
|
|
58
|
+
# OR
|
|
59
|
+
npm version patch # 1.0.0 → 1.0.1
|
|
60
|
+
# OR
|
|
61
|
+
npm version major # 1.0.0 → 2.0.0
|
|
62
|
+
|
|
63
|
+
# 3. Push with tags
|
|
64
|
+
git push origin main --tags
|
|
65
|
+
|
|
66
|
+
# ✅ Done! Release workflow triggers automatically
|
|
67
|
+
# ✅ GitHub Release created
|
|
68
|
+
# ✅ npm published automatically
|
|
69
|
+
# ✅ Artifacts uploaded
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**What happens automatically:**
|
|
73
|
+
- GitHub Actions creates GitHub Release
|
|
74
|
+
- Distribution archives created (tar.gz, zip)
|
|
75
|
+
- Artifacts uploaded to GitHub
|
|
76
|
+
- npm publish triggered
|
|
77
|
+
- Release comments updated with npm URL
|
|
78
|
+
|
|
79
|
+
### Method 2: Manual (Emergency Only)
|
|
80
|
+
|
|
81
|
+
For when automatic publishing fails or needs manual intervention:
|
|
82
|
+
|
|
83
|
+
1. Go to GitHub Actions
|
|
84
|
+
2. Click "Manual Publish" workflow
|
|
85
|
+
3. Enter version (e.g., `1.1.0`)
|
|
86
|
+
4. Select npm tag (`latest`, `beta`, etc.)
|
|
87
|
+
5. Run workflow
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Version Bumping
|
|
92
|
+
|
|
93
|
+
### Using `npm version`
|
|
94
|
+
|
|
95
|
+
The recommended way:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Patch release (bug fixes)
|
|
99
|
+
npm version patch
|
|
100
|
+
# 1.0.0 → 1.0.1
|
|
101
|
+
|
|
102
|
+
# Minor release (new features)
|
|
103
|
+
npm version minor
|
|
104
|
+
# 1.0.0 → 1.1.0
|
|
105
|
+
|
|
106
|
+
# Major release (breaking changes)
|
|
107
|
+
npm version major
|
|
108
|
+
# 1.0.0 → 2.0.0
|
|
109
|
+
|
|
110
|
+
# Pre-release
|
|
111
|
+
npm version prerelease
|
|
112
|
+
# 1.0.0 → 1.0.1-0
|
|
113
|
+
|
|
114
|
+
# Custom version
|
|
115
|
+
npm version 1.5.0
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**What `npm version` does automatically:**
|
|
119
|
+
- Updates version in package.json
|
|
120
|
+
- Updates version in package-lock.json
|
|
121
|
+
- Creates commit with message `v1.1.0`
|
|
122
|
+
- Creates git tag `v1.1.0`
|
|
123
|
+
- Does NOT push (you do that)
|
|
124
|
+
|
|
125
|
+
### Manual Version Update (Not Recommended)
|
|
126
|
+
|
|
127
|
+
Only do this if you need full control:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# 1. Edit package.json manually
|
|
131
|
+
vim package.json
|
|
132
|
+
# Change "version": "1.0.0" to "1.0.1"
|
|
133
|
+
|
|
134
|
+
# 2. Create git tag manually
|
|
135
|
+
git add package.json
|
|
136
|
+
git commit -m "chore: bump version to 1.0.1"
|
|
137
|
+
git tag v1.0.1
|
|
138
|
+
git push origin main --tags
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Workflow Triggers
|
|
144
|
+
|
|
145
|
+
### Release Workflow Triggers On
|
|
146
|
+
|
|
147
|
+
**Main branch receives commit with:**
|
|
148
|
+
- `[release]` in commit message, OR
|
|
149
|
+
- `chore(release)` in commit message, OR
|
|
150
|
+
- Commit message starts with `v`
|
|
151
|
+
|
|
152
|
+
**Examples that trigger:**
|
|
153
|
+
```bash
|
|
154
|
+
npm version patch # Creates commit "v1.0.1"
|
|
155
|
+
git commit -m "[release] prepare version 1.0.1"
|
|
156
|
+
git commit -m "chore(release): bump to 1.0.1"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Publish Workflow Triggers On
|
|
160
|
+
|
|
161
|
+
**GitHub Release published** (created by Release workflow)
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Artifacts in GitHub Releases
|
|
166
|
+
|
|
167
|
+
### What Gets Uploaded
|
|
168
|
+
|
|
169
|
+
**Distribution Archives:**
|
|
170
|
+
- `huntr-cli-1.1.0.tar.gz` — Gzipped tarball
|
|
171
|
+
- `huntr-cli-1.1.0.zip` — ZIP archive
|
|
172
|
+
|
|
173
|
+
Both contain compiled `dist/` directory ready to use.
|
|
174
|
+
|
|
175
|
+
**Where to find:**
|
|
176
|
+
1. GitHub repo
|
|
177
|
+
2. Releases tab
|
|
178
|
+
3. Click release version
|
|
179
|
+
4. Scroll down to see assets
|
|
180
|
+
|
|
181
|
+
**Download URL:**
|
|
182
|
+
```
|
|
183
|
+
https://github.com/mattmck/huntr-cli/releases/download/v1.1.0/huntr-cli-1.1.0.tar.gz
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Use Cases for Artifacts
|
|
187
|
+
|
|
188
|
+
**Users can download pre-built binaries:**
|
|
189
|
+
```bash
|
|
190
|
+
# Download and extract
|
|
191
|
+
wget https://github.com/mattmck/huntr-cli/releases/download/v1.1.0/huntr-cli-1.1.0.tar.gz
|
|
192
|
+
tar xzf huntr-cli-1.1.0.tar.gz
|
|
193
|
+
|
|
194
|
+
# Or use npm (recommended)
|
|
195
|
+
npm install -g huntr-cli
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Git Tag vs GitHub Release
|
|
201
|
+
|
|
202
|
+
### Git Tags
|
|
203
|
+
|
|
204
|
+
Created automatically by `npm version`:
|
|
205
|
+
```bash
|
|
206
|
+
git tag v1.1.0
|
|
207
|
+
git push origin v1.1.0
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Used for:**
|
|
211
|
+
- Marking commits in git history
|
|
212
|
+
- Release workflow detection
|
|
213
|
+
- Version tracking
|
|
214
|
+
|
|
215
|
+
### GitHub Releases
|
|
216
|
+
|
|
217
|
+
Created automatically by Release workflow:
|
|
218
|
+
- Release page on GitHub
|
|
219
|
+
- Download artifacts
|
|
220
|
+
- Release notes
|
|
221
|
+
- Announcement
|
|
222
|
+
|
|
223
|
+
**Includes:**
|
|
224
|
+
- Changelog (auto-generated from commits)
|
|
225
|
+
- Artifacts (tar.gz, zip)
|
|
226
|
+
- npm URL (from publish workflow)
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Complete Release Timeline
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
Day 1: Feature Work
|
|
234
|
+
↓
|
|
235
|
+
git checkout -b feat/my-feature
|
|
236
|
+
edit src/
|
|
237
|
+
npm run lint:fix && npm run build
|
|
238
|
+
git add . && git commit -m "feat: add feature"
|
|
239
|
+
git push origin feat/my-feature
|
|
240
|
+
↓
|
|
241
|
+
GitHub PR created
|
|
242
|
+
GitHub Actions CI runs (lint, build, test)
|
|
243
|
+
↓
|
|
244
|
+
PR reviewed and merged to main
|
|
245
|
+
↓
|
|
246
|
+
Day 2: Release
|
|
247
|
+
↓
|
|
248
|
+
git checkout main && git pull
|
|
249
|
+
npm version minor # Creates commit + tag
|
|
250
|
+
git push origin main --tags
|
|
251
|
+
↓
|
|
252
|
+
[Release Workflow] Triggers automatically
|
|
253
|
+
- Detects version bump
|
|
254
|
+
- Runs full CI
|
|
255
|
+
- Creates archives
|
|
256
|
+
- Creates GitHub Release
|
|
257
|
+
↓
|
|
258
|
+
Release created on GitHub with:
|
|
259
|
+
- Artifacts (tar.gz, zip)
|
|
260
|
+
- Changelog
|
|
261
|
+
- Ready for publishing
|
|
262
|
+
↓
|
|
263
|
+
[Publish Workflow] Triggers automatically
|
|
264
|
+
- Publishes to npm
|
|
265
|
+
- Comments on release
|
|
266
|
+
↓
|
|
267
|
+
✅ Live on npmjs.com!
|
|
268
|
+
Users can: npm install -g huntr-cli
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## Checklist Before Releasing
|
|
274
|
+
|
|
275
|
+
- [ ] All changes merged to main
|
|
276
|
+
- [ ] CI passing on main (all green checks)
|
|
277
|
+
- [ ] README.md updated if needed
|
|
278
|
+
- [ ] CHANGELOG.md updated with new features
|
|
279
|
+
- [ ] No breaking changes (or clearly documented)
|
|
280
|
+
- [ ] Tests passing
|
|
281
|
+
- [ ] Lint passing locally
|
|
282
|
+
- [ ] Build successful locally
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Troubleshooting
|
|
287
|
+
|
|
288
|
+
### Release Failed to Create
|
|
289
|
+
|
|
290
|
+
**Check:**
|
|
291
|
+
1. Push included `--tags` flag?
|
|
292
|
+
```bash
|
|
293
|
+
git push origin main --tags
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
2. Commit message triggers release?
|
|
297
|
+
- Should start with `v` or contain `[release]`
|
|
298
|
+
- `npm version` creates correct format automatically
|
|
299
|
+
|
|
300
|
+
3. Version in package.json updated?
|
|
301
|
+
```bash
|
|
302
|
+
grep '"version"' package.json
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### Publish Failed
|
|
306
|
+
|
|
307
|
+
**Check:**
|
|
308
|
+
1. NPM_TOKEN secret configured?
|
|
309
|
+
- Settings → Secrets → Actions
|
|
310
|
+
- `NPM_TOKEN` exists and is valid
|
|
311
|
+
|
|
312
|
+
2. Version already published?
|
|
313
|
+
```bash
|
|
314
|
+
npm view huntr-cli version
|
|
315
|
+
```
|
|
316
|
+
- Can't publish same version twice
|
|
317
|
+
- Bump version and retry
|
|
318
|
+
|
|
319
|
+
3. Build failed?
|
|
320
|
+
- Check Actions logs
|
|
321
|
+
- Fix issues locally
|
|
322
|
+
- Create new release
|
|
323
|
+
|
|
324
|
+
### Both Failed
|
|
325
|
+
|
|
326
|
+
1. Check Actions tab for error logs
|
|
327
|
+
2. Fix locally (lint, build, typecheck)
|
|
328
|
+
3. Create new version tag
|
|
329
|
+
4. Push to trigger workflows again
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
## Manual Recovery
|
|
334
|
+
|
|
335
|
+
If automated workflows fail completely:
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
# Manually build and publish
|
|
339
|
+
npm run build
|
|
340
|
+
npm publish --tag latest
|
|
341
|
+
|
|
342
|
+
# Create release manually
|
|
343
|
+
git tag v1.1.0
|
|
344
|
+
git push origin v1.1.0
|
|
345
|
+
gh release create v1.1.0 --generate-notes
|
|
346
|
+
|
|
347
|
+
# Upload artifacts manually
|
|
348
|
+
gh release upload v1.1.0 ./dist-archives/*
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## Monitoring Releases
|
|
354
|
+
|
|
355
|
+
### Check Status
|
|
356
|
+
|
|
357
|
+
**GitHub:**
|
|
358
|
+
1. Go to repo
|
|
359
|
+
2. Actions tab
|
|
360
|
+
3. See Release and Publish workflows
|
|
361
|
+
|
|
362
|
+
**npm:**
|
|
363
|
+
```bash
|
|
364
|
+
npm view huntr-cli version # Latest version
|
|
365
|
+
npm view huntr-cli versions # All versions
|
|
366
|
+
npm info huntr-cli # Full details
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
**Command line:**
|
|
370
|
+
```bash
|
|
371
|
+
# Check what's live on npm
|
|
372
|
+
npm view huntr-cli@latest
|
|
373
|
+
|
|
374
|
+
# Install latest
|
|
375
|
+
npm install -g huntr-cli@latest
|
|
376
|
+
|
|
377
|
+
# Verify installation
|
|
378
|
+
huntr --version
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## Pre-release Versions
|
|
384
|
+
|
|
385
|
+
### Beta Release
|
|
386
|
+
|
|
387
|
+
For testing before stable release:
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
npm version prerelease # 1.1.0 → 1.1.1-0
|
|
391
|
+
git push origin main --tags
|
|
392
|
+
# Then in Manual Publish workflow:
|
|
393
|
+
# version: 1.1.1-0
|
|
394
|
+
# npm_tag: beta
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
Users can install:
|
|
398
|
+
```bash
|
|
399
|
+
npm install -g huntr-cli@beta
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
### RC (Release Candidate)
|
|
403
|
+
|
|
404
|
+
```bash
|
|
405
|
+
npm version 1.1.0-rc.1
|
|
406
|
+
git push origin main --tags
|
|
407
|
+
# Manual Publish with npm_tag: rc
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
Users can test:
|
|
411
|
+
```bash
|
|
412
|
+
npm install -g huntr-cli@rc
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## Release Notes Template
|
|
418
|
+
|
|
419
|
+
The changelog is auto-generated from commits. Format your commits properly:
|
|
420
|
+
|
|
421
|
+
```bash
|
|
422
|
+
git commit -m "feat: add feature description"
|
|
423
|
+
git commit -m "fix: resolve issue description"
|
|
424
|
+
git commit -m "docs: update documentation"
|
|
425
|
+
git commit -m "perf: improve performance"
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
These appear automatically in release notes!
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
## Security & Stability
|
|
433
|
+
|
|
434
|
+
### Before Releasing
|
|
435
|
+
|
|
436
|
+
✅ **Always:**
|
|
437
|
+
- Wait for CI to pass
|
|
438
|
+
- Test locally: `npm run build && npm run lint && npm run typecheck`
|
|
439
|
+
- Review changes one more time
|
|
440
|
+
- Update CHANGELOG.md
|
|
441
|
+
- Update version number only once per release
|
|
442
|
+
|
|
443
|
+
❌ **Never:**
|
|
444
|
+
- Force-push after tagging
|
|
445
|
+
- Publish from unverified commits
|
|
446
|
+
- Skip CI checks
|
|
447
|
+
- Release untested code
|
|
448
|
+
|
|
449
|
+
### After Publishing
|
|
450
|
+
|
|
451
|
+
1. Verify npm shows new version
|
|
452
|
+
2. Test installation: `npm install -g huntr-cli@latest`
|
|
453
|
+
3. Run basic commands: `huntr --version`, `huntr me`
|
|
454
|
+
4. Post release announcement (optional)
|
|
455
|
+
|
|
456
|
+
---
|
|
457
|
+
|
|
458
|
+
## GitHub Release URL Format
|
|
459
|
+
|
|
460
|
+
```
|
|
461
|
+
https://github.com/mattmck/huntr-cli/releases/tag/v1.1.0
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
Direct download URLs:
|
|
465
|
+
```
|
|
466
|
+
https://github.com/mattmck/huntr-cli/releases/download/v1.1.0/huntr-cli-1.1.0.tar.gz
|
|
467
|
+
https://github.com/mattmck/huntr-cli/releases/download/v1.1.0/huntr-cli-1.1.0.zip
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
---
|
|
471
|
+
|
|
472
|
+
## Environment Variables
|
|
473
|
+
|
|
474
|
+
### Required Secrets
|
|
475
|
+
|
|
476
|
+
**NPM_TOKEN**
|
|
477
|
+
- Generate on npmjs.com: Profile → Access Tokens
|
|
478
|
+
- Must be "Automation" level token
|
|
479
|
+
- Add to GitHub: Settings → Secrets → Actions
|
|
480
|
+
|
|
481
|
+
**GITHUB_TOKEN**
|
|
482
|
+
- Provided automatically by GitHub Actions
|
|
483
|
+
- No setup needed
|
|
484
|
+
|
|
485
|
+
### Optional Secrets
|
|
486
|
+
|
|
487
|
+
**SLACK_WEBHOOK_URL**
|
|
488
|
+
- For Slack notifications
|
|
489
|
+
- Create webhook in Slack workspace
|
|
490
|
+
- Add to GitHub secrets for manual publish workflow
|
|
491
|
+
|
|
492
|
+
---
|
|
493
|
+
|
|
494
|
+
## Summary
|
|
495
|
+
|
|
496
|
+
| What | When | How |
|
|
497
|
+
|------|------|-----|
|
|
498
|
+
| **Bump version** | Before release | `npm version minor/patch/major` |
|
|
499
|
+
| **Create release** | After push with tags | Automatic (Release workflow) |
|
|
500
|
+
| **Publish npm** | After release created | Automatic (Publish workflow) |
|
|
501
|
+
| **View artifacts** | After release | GitHub Releases page |
|
|
502
|
+
| **Install** | Anytime | `npm install -g huntr-cli` |
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
## Quick Reference
|
|
507
|
+
|
|
508
|
+
```bash
|
|
509
|
+
# Complete release in 3 commands
|
|
510
|
+
npm version minor
|
|
511
|
+
git push origin main --tags
|
|
512
|
+
# Wait for workflows to complete (check Actions tab)
|
|
513
|
+
|
|
514
|
+
# Verify
|
|
515
|
+
npm view huntr-cli version
|
|
516
|
+
npm install -g huntr-cli
|
|
517
|
+
huntr --version
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
That's it! Everything else is automatic. 🚀
|