File tree 9 files changed +76
-455
lines changed
9 files changed +76
-455
lines changed Original file line number Diff line number Diff line change
1
+ name : " Release CLI"
2
+ on :
3
+ push :
4
+ tags :
5
+ - " v*"
6
+ permissions :
7
+ contents : " write"
8
+ id-token : write
9
+ jobs :
10
+ release :
11
+ # note: must use GitHub-hosted runner for publishing to NPM with --provenance flag
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : " Validate version"
15
+ if : ${{ !startsWith(github.ref_name, 'v') }}
16
+ run : ' echo "Hyp CLI version must start with `v` && exit 1'
17
+ - uses : actions/checkout@v4
18
+ with :
19
+ ref : " ${{ github.ref_name }}"
20
+ - name : Parse CLI Version
21
+ id : parse_cli_version
22
+ run : |
23
+ echo "cli_version=${{ github.ref_name }}" >> $GITHUB_OUTPUT
24
+ echo "npm_tag=$(echo '${{ github.ref_name }}' | sed -E 's/^[^-]+-([a-zA-Z]+).*/\1/ ; s/v.*/latest/')" >> $GITHUB_OUTPUT
25
+ - name : Setup Node
26
+ uses : actions/setup-node@v4
27
+ with :
28
+ node-version : " >=22"
29
+ registry-url : " https://registry.npmjs.org"
30
+ - name : Prepare Release
31
+ run : npm version ${{ steps.parse_cli_version.outputs.cli_version }} --no-git-tag-version
32
+ - name : Install Dependencies
33
+ run : npm ci
34
+ - name : Build
35
+ run : npm run build
36
+ - name : Publish NPM Package
37
+ run : npm publish --provenance --access public --tag ${{ steps.parse_cli_version.outputs.npm_tag }}
38
+ env :
39
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
40
+ - name : Create Release
41
+ uses : softprops/action-gh-release@v2
42
+ with :
43
+ prerelease : ${{ contains(steps.parse_cli_version.outputs.cli_version, '-') }}
44
+ make_latest : ${{ contains(steps.parse_cli_version.outputs.cli_version, '-') }}
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ A new CLI for the Hypermode service
16
16
17
17
<!-- usage -->
18
18
``` sh-session
19
- $ npm install -g @hyp/ cli
19
+ $ npm install -g @hypermode/hyp- cli
20
20
$ hyp COMMAND
21
21
running command...
22
22
$ hyp (--version)
23
- @hyp/ cli/0.0.0 linux-x64 node-v22.8 .0
23
+ @hypermode/hyp- cli/0.0.1-alpha.1 darwin-arm64 node-v22.9 .0
24
24
$ hyp --help [COMMAND]
25
25
USAGE
26
26
$ hyp COMMAND
@@ -40,28 +40,28 @@ USAGE
40
40
Login to Hypermode Console
41
41
42
42
```
43
- Usage: hyp login
43
+ [1mUsage:[22m [1m[94mhyp[39m[22m login
44
44
```
45
45
46
- _ See code: [ src/commands/login/index.ts] ( https://github.com/hypermodeinc/hyp-cli/blob/v0.0.0 /src/commands/login/index.ts ) _
46
+ _ See code: [ src/commands/login/index.ts] ( https://github.com/hypermodeinc/hyp-cli/blob/v0.0.1-alpha.1 /src/commands/login/index.ts ) _
47
47
48
48
## ` hyp logout `
49
49
50
50
Logout of Hypermode Console in the CLI
51
51
52
52
```
53
- Usage: hyp logout
53
+ [1mUsage:[22m [1m[94mhyp[39m[22m logout
54
54
```
55
55
56
- _ See code: [ src/commands/logout/index.ts] ( https://github.com/hypermodeinc/hyp-cli/blob/v0.0.0 /src/commands/logout/index.ts ) _
56
+ _ See code: [ src/commands/logout/index.ts] ( https://github.com/hypermodeinc/hyp-cli/blob/v0.0.1-alpha.1 /src/commands/logout/index.ts ) _
57
57
58
58
## ` hyp org switch `
59
59
60
60
Switch the current Hypermode organization
61
61
62
62
```
63
- Usage: hyp org:switch
63
+ [1mUsage:[22m [1m[94mhyp[39m[22m org:switch
64
64
```
65
65
66
- _ See code: [ src/commands/org/switch.ts] ( https://github.com/hypermodeinc/hyp-cli/blob/v0.0.0 /src/commands/org/switch.ts ) _
66
+ _ See code: [ src/commands/org/switch.ts] ( https://github.com/hypermodeinc/hyp-cli/blob/v0.0.1-alpha.1 /src/commands/org/switch.ts ) _
67
67
<!-- commandsstop -->
You can’t perform that action at this time.
0 commit comments