Skip to content

Commit 9878c46

Browse files
feat: release binaries
1 parent bad6f79 commit 9878c46

File tree

12 files changed

+11488
-163
lines changed

12 files changed

+11488
-163
lines changed

.github/workflows/release.yml

+50-29
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,66 @@
11
name: release
22
on:
3-
push:
4-
branches:
5-
- main
3+
pull_request: # remove me when ready
64
workflow_dispatch:
75

86
permissions:
97
contents: read
108

119
jobs:
12-
release-please:
10+
check:
11+
name: Check version
1312
runs-on: ubuntu-latest
1413
outputs:
15-
release_created: ${{ steps.release.outputs.release_created }}
16-
permissions:
17-
contents: write
18-
pull-requests: write
14+
version: ${{ steps.version.outputs.version }}
1915
steps:
20-
- uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445 # v4.2.0
21-
id: release
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
17+
- name: Check version changes
18+
uses: EndBug/version-check@36ff30f37c7deabe56a30caa043d127be658c425
19+
id: version
2220
with:
23-
token: ${{ secrets.RELEASE_PLEASE_GITHUB_TOKEN }}
24-
config-file: release-please-config.json
25-
manifest-file: .release-please-manifest.json
21+
diff-search: true
22+
file-name: package.json
2623

27-
release:
28-
needs: release-please
29-
if: ${{ needs.release-please.outputs.release_created }}
30-
runs-on: ubuntu-latest
31-
permissions:
32-
contents: write
33-
id-token: write
24+
build:
25+
strategy:
26+
matrix:
27+
include:
28+
- os: windows-2022
29+
target: x86_64-pc-windows-msvc
30+
code-target: win32-x64
31+
- os: ubuntu-20.04
32+
target: x86_64-unknown-linux-gnu
33+
code-target: linux-x64
34+
- os: macos-14
35+
target: aarch64-apple-darwin
36+
code-target: darwin-arm64
37+
name: Package ${{ matrix.code-target }}
38+
runs-on: ${{ matrix.os }}
39+
needs: check
40+
env:
41+
version: ${{ needs.check.outputs.version }}
3442
steps:
35-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36-
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
43+
- name: Checkout repository
44+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
45+
- name: Install Node.js
46+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
3747
with:
3848
node-version-file: '.nvmrc'
39-
registry-url: 'https://registry.npmjs.org'
40-
- run: npm install
41-
- run: npm run build
42-
- name: Create NPM release
43-
run: npm publish --provenance --access public
44-
env:
45-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
49+
- name: Install linux toolchain
50+
if: matrix.code-target == 'linux-x64'
51+
run: |
52+
sudo apt install nsis p7zip-full p7zip-rar -y
53+
- name: Install win32 toolchain
54+
if: matrix.code-target == 'win32-x64'
55+
run: |
56+
choco install 7zip nsis grep gnuwin32-coreutils.install -y
57+
echo "C:\Program Files (x86)\GnuWin32\bin" >> $GITHUB_PATH
58+
- name: Install npm dependencies
59+
run: npm ci
60+
- name: Build javascript
61+
run: npm run build
62+
- name: Build binaries
63+
run: |
64+
cd packages/cli-${{ matrix.code-target }}
65+
npm ci
66+
npm run pack

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
*-error.log
33
**/.DS_Store
44
/.idea
5-
/dist
6-
/tmp
5+
dist
6+
tmp
77
node_modules
88
oclif.manifest.json
99

.release-please-manifest.json

-3
This file was deleted.

README.md

+24-120
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ The HeroDevs CLI
77
[![Downloads/week](https://img.shields.io/npm/dw/@herodevs/cli.svg)](https://npmjs.org/package/@herodevs/cli)
88

99
<!-- toc -->
10-
* [Usage](#usage)
11-
* [Commands](#commands)
10+
* [@herodevs/cli](#herodevscli)
1211
<!-- tocstop -->
1312
## Usage
1413
<!-- usage -->
@@ -17,7 +16,7 @@ $ npm install -g @herodevs/cli
1716
$ hd COMMAND
1817
running command...
1918
$ hd (--version)
20-
@herodevs/cli/2.0.0 darwin-arm64 node-v22.13.1
19+
@herodevs/cli/2.0.0 darwin-arm64 node-v22.13.0
2120
$ hd --help [COMMAND]
2221
USAGE
2322
$ hd COMMAND
@@ -37,58 +36,14 @@ USAGE
3736
* [`hd plugins uninstall [PLUGIN]`](#hd-plugins-uninstall-plugin)
3837
* [`hd plugins unlink [PLUGIN]`](#hd-plugins-unlink-plugin)
3938
* [`hd plugins update`](#hd-plugins-update)
40-
* [`hd report committers [FILE]`](#hd-report-committers-file)
41-
* [`hd scan eol [DIR]`](#hd-scan-eol-dir)
4239

43-
### `hd help [COMMAND]`
40+
## `hd help [COMMAND]`
4441

4542
Display help for hd.
4643

47-
```text
48-
USAGE
49-
$ mycli123 hello PERSON -f <value>
50-
51-
ARGUMENTS
52-
PERSON Person to say hello to
53-
54-
FLAGS
55-
-f, --from=<value> (required) Who is saying hello
56-
57-
DESCRIPTION
58-
Say hello
59-
60-
EXAMPLES
61-
$ mycli123 hello friend --from oclif
62-
hello friend from oclif! (./src/commands/hello/index.ts)
63-
```
64-
65-
_See code: [src/commands/hello/index.ts](https://github.com/mdonnalley/mycli123/blob/v0.0.0/src/commands/hello/index.ts)_
66-
67-
### `mycli123 hello world`
68-
69-
Say hello world
70-
71-
```text
72-
USAGE
73-
$ mycli123 hello world
74-
75-
DESCRIPTION
76-
Say hello world
77-
78-
EXAMPLES
79-
$ mycli123 hello world
80-
hello world! (./src/commands/hello/world.ts)
8144
```
82-
83-
_See code: [src/commands/hello/world.ts](https://github.com/mdonnalley/mycli123/blob/v0.0.0/src/commands/hello/world.ts)_
84-
85-
### `mycli123 help [COMMAND]`
86-
87-
Display help for mycli123.
88-
89-
```text
9045
USAGE
91-
$ mycli123 help [COMMAND...] [-n]
46+
$ hd help [COMMAND...] [-n]
9247
9348
ARGUMENTS
9449
COMMAND... Command to show help for.
@@ -102,11 +57,11 @@ DESCRIPTION
10257

10358
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.26/src/commands/help.ts)_
10459

105-
### `hd plugins`
60+
## `hd plugins`
10661

10762
List installed plugins.
10863

109-
```text
64+
```
11065
USAGE
11166
$ hd plugins [--json] [--core]
11267
@@ -125,11 +80,11 @@ EXAMPLES
12580

12681
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/index.ts)_
12782

128-
### `hd plugins add PLUGIN`
83+
## `hd plugins add PLUGIN`
12984

13085
Installs a plugin into hd.
13186

132-
```text
87+
```
13388
USAGE
13489
$ hd plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
13590
@@ -172,11 +127,11 @@ EXAMPLES
172127
$ hd plugins add someuser/someplugin
173128
```
174129

175-
### `hd plugins:inspect PLUGIN...`
130+
## `hd plugins:inspect PLUGIN...`
176131

177132
Displays installation properties of a plugin.
178133

179-
```text
134+
```
180135
USAGE
181136
$ hd plugins inspect PLUGIN...
182137
@@ -199,11 +154,11 @@ EXAMPLES
199154

200155
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/inspect.ts)_
201156

202-
### `hd plugins install PLUGIN`
157+
## `hd plugins install PLUGIN`
203158

204159
Installs a plugin into hd.
205160

206-
```text
161+
```
207162
USAGE
208163
$ hd plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
209164
@@ -248,11 +203,11 @@ EXAMPLES
248203

249204
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/install.ts)_
250205

251-
### `hd plugins link PATH`
206+
## `hd plugins link PATH`
252207

253208
Links a plugin into the CLI for development.
254209

255-
```text
210+
```
256211
USAGE
257212
$ hd plugins link PATH [-h] [--install] [-v]
258213
@@ -279,11 +234,11 @@ EXAMPLES
279234

280235
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/link.ts)_
281236

282-
### `hd plugins remove [PLUGIN]`
237+
## `hd plugins remove [PLUGIN]`
283238

284239
Removes a plugin from the CLI.
285240

286-
```text
241+
```
287242
USAGE
288243
$ hd plugins remove [PLUGIN...] [-h] [-v]
289244
@@ -305,11 +260,11 @@ EXAMPLES
305260
$ hd plugins remove myplugin
306261
```
307262

308-
### `hd plugins reset`
263+
## `hd plugins reset`
309264

310265
Remove all user-installed and linked plugins.
311266

312-
```text
267+
```
313268
USAGE
314269
$ hd plugins reset [--hard] [--reinstall]
315270
@@ -320,11 +275,11 @@ FLAGS
320275

321276
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/reset.ts)_
322277

323-
### `hd plugins uninstall [PLUGIN]`
278+
## `hd plugins uninstall [PLUGIN]`
324279

325280
Removes a plugin from the CLI.
326281

327-
```text
282+
```
328283
USAGE
329284
$ hd plugins uninstall [PLUGIN...] [-h] [-v]
330285
@@ -348,11 +303,11 @@ EXAMPLES
348303

349304
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/uninstall.ts)_
350305

351-
### `hd plugins unlink [PLUGIN]`
306+
## `hd plugins unlink [PLUGIN]`
352307

353308
Removes a plugin from the CLI.
354309

355-
```text
310+
```
356311
USAGE
357312
$ hd plugins unlink [PLUGIN...] [-h] [-v]
358313
@@ -374,11 +329,11 @@ EXAMPLES
374329
$ hd plugins unlink myplugin
375330
```
376331

377-
### `hd plugins update`
332+
## `hd plugins update`
378333

379334
Update installed plugins.
380335

381-
```text
336+
```
382337
USAGE
383338
$ hd plugins update [-h] [-v]
384339
@@ -391,55 +346,4 @@ DESCRIPTION
391346
```
392347

393348
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/update.ts)_
394-
395-
### `hd report committers [FILE]`
396-
397-
describe the command here
398-
399-
```text
400-
USAGE
401-
$ hd report committers [FILE] [-f] [-n <value>]
402-
403-
ARGUMENTS
404-
FILE file to read
405-
406-
FLAGS
407-
-f, --force
408-
-n, --name=<value> name to print
409-
410-
DESCRIPTION
411-
describe the command here
412-
413-
EXAMPLES
414-
$ hd report committers
415-
```
416-
417-
_See code: [src/commands/report/committers.ts](https://github.com/herodevs/cli/blob/v2.0.0/src/commands/report/committers.ts)_
418-
419-
### `hd scan eol [DIR]`
420-
421-
Scan a given directory
422-
423-
```text
424-
USAGE
425-
$ hd scan eol [DIR] [--json] [-a] [-d <value>]
426-
427-
ARGUMENTS
428-
DIR file to read
429-
430-
FLAGS
431-
-a, --all
432-
-d, --dir=<value> [default: /Users/edward/code/herodevs/cli] The directory to scan
433-
434-
GLOBAL FLAGS
435-
--json Format output as json.
436-
437-
DESCRIPTION
438-
Scan a given directory
439-
440-
EXAMPLES
441-
$ hd scan eol
442-
```
443-
444-
_See code: [src/commands/scan/eol.ts](https://github.com/herodevs/cli/blob/v2.0.0/src/commands/scan/eol.ts)_
445349
<!-- commandsstop -->

0 commit comments

Comments
 (0)