@deploily/deploily-cli 0.1.0 → 0.1.1
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/.github/workflows/publish.yml +20 -11
- package/README.md +21 -0
- package/dist/index.js +0 -0
- package/package.json +3 -3
- package/pnpm-workspace.yaml +0 -2
|
@@ -10,30 +10,39 @@ jobs:
|
|
|
10
10
|
publish:
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
if: github.repository_owner == 'deploily'
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
id-token: write
|
|
16
|
+
env:
|
|
17
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET_TOKEN }}
|
|
13
18
|
|
|
14
19
|
steps:
|
|
15
20
|
- name: Checkout repository
|
|
16
21
|
uses: actions/checkout@v4
|
|
17
22
|
|
|
23
|
+
- name: Set up pnpm
|
|
24
|
+
uses: pnpm/action-setup@v4
|
|
25
|
+
|
|
18
26
|
- name: Set up Node.js
|
|
19
27
|
uses: actions/setup-node@v4
|
|
20
28
|
with:
|
|
21
|
-
node-version:
|
|
29
|
+
node-version: 24
|
|
30
|
+
cache: pnpm
|
|
22
31
|
registry-url: "https://registry.npmjs.org/"
|
|
23
32
|
|
|
24
33
|
- name: Install dependencies
|
|
25
|
-
run:
|
|
34
|
+
run: pnpm install --frozen-lockfile
|
|
35
|
+
|
|
36
|
+
- name: Build project
|
|
37
|
+
run: pnpm run build
|
|
26
38
|
|
|
27
|
-
- name:
|
|
39
|
+
- name: Verify npm authentication
|
|
28
40
|
run: |
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
run: npm whoami
|
|
35
|
-
env:
|
|
36
|
-
NPM_SECRET_TOKEN: ${{ secrets.NPM_SECRET_TOKEN }}
|
|
41
|
+
printf "//registry.npmjs.org/:_authToken=%s\n" "${NODE_AUTH_TOKEN}" > ~/.npmrc
|
|
42
|
+
npm whoami
|
|
43
|
+
|
|
44
|
+
- name: Dry-run publish
|
|
45
|
+
run: npm publish --access public --dry-run
|
|
37
46
|
|
|
38
47
|
- name: Publish package
|
|
39
48
|
run: npm publish --access public
|
package/README.md
CHANGED
|
@@ -103,3 +103,24 @@ Shows the current authenticated user when credentials are available.
|
|
|
103
103
|
- `src/storage/` - credential persistence
|
|
104
104
|
- `src/utils/` - PKCE helpers
|
|
105
105
|
- `src/types/` - shared TypeScript types
|
|
106
|
+
|
|
107
|
+
## Publishing
|
|
108
|
+
|
|
109
|
+
Before publishing to npm, verify that the auth token works and that the package will publish successfully:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
export NPM_TOKEN="npm_your_token_here"
|
|
113
|
+
npm config set //registry.npmjs.org/:_authToken "$NPM_TOKEN"
|
|
114
|
+
npm whoami
|
|
115
|
+
npm publish --access public --dry-run
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
In GitHub Actions, configure a repository secret named `NPM_TOKEN` and the workflow will:
|
|
119
|
+
|
|
120
|
+
- install dependencies
|
|
121
|
+
- build the CLI
|
|
122
|
+
- validate authentication with `npm whoami`
|
|
123
|
+
- run a `npm publish --dry-run`
|
|
124
|
+
- publish the package to npm on a successful run
|
|
125
|
+
|
|
126
|
+
This makes it easy to confirm the publish phase is working before the actual release is made.
|
package/dist/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deploily/deploily-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Deploily CLI - Deploy and manage your applications with ease",
|
|
5
5
|
"license": "APACHE-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"start": "node dist/index.js"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@deploily/deploily-cli": "link:",
|
|
23
22
|
"@hono/node-server": "^2.0.6",
|
|
24
23
|
"axios": "^1.18.1",
|
|
25
24
|
"chalk": "^5.6.2",
|
|
@@ -33,5 +32,6 @@
|
|
|
33
32
|
"@types/node": "^25.9.3",
|
|
34
33
|
"tsx": "^4.22.4",
|
|
35
34
|
"typescript": "^6.0.3"
|
|
36
|
-
}
|
|
35
|
+
},
|
|
36
|
+
"packageManager": "pnpm@11.23.0"
|
|
37
37
|
}
|