Skip to content

Commit 91330ae

Browse files
committed
fix some publish flows
1 parent 58420ae commit 91330ae

File tree

5 files changed

+26
-10
lines changed

5 files changed

+26
-10
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
- name: Install dependencies
2727
run: npm ci
2828

29+
- name: Generate API client
30+
run: npm run update-api
31+
2932
- name: Type check
3033
run: npx tsc --noEmit
3134

.github/workflows/publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
- name: Install dependencies
2626
run: npm ci
2727

28+
- name: Generate API client
29+
run: npm run update-api
30+
2831
- name: Build
2932
run: npm run build
3033

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
{
2-
"name": "codacy-cloud-cli",
2+
"name": "@codacy/codacy-cloud-cli",
33
"version": "1.0.0",
44
"description": "A command-line tool to interact with Codacy Cloud from your terminal",
5+
"homepage": "https://www.codacy.com",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://github.com/codacy/codacy-cloud-cli.git"
9+
},
10+
"bugs": {
11+
"url": "https://github.com/codacy/codacy-cloud-cli/issues"
12+
},
513
"main": "dist/index.js",
614
"bin": {
715
"codacy": "dist/index.js"
@@ -11,22 +19,24 @@
1119
],
1220
"scripts": {
1321
"test": "vitest run",
14-
"build": "tsc -p tsconfig.build.json",
15-
"prepublishOnly": "npm run build",
22+
"build": "tsc -p tsconfig.build.json && chmod +x dist/index.js",
23+
"prepublishOnly": "npm run update-api && npm run build",
1624
"start": "npx ts-node src/index.ts",
1725
"start:dist": "node dist/index.js",
1826
"fetch-api": "curl https://artifacts.codacy.com/api/codacy-api/50.7.17/apiv3-bundled.yaml -o ./api-v3/api-swagger.yaml --create-dirs",
1927
"generate-api": "rm -rf ./src/api/client && openapi --input ./api-v3/api-swagger.yaml --output ./src/api/client --useUnionTypes --indent 2 --client fetch",
20-
"update-api": "npm run fetch-api && npm run generate-api",
21-
"postinstall": "npm run update-api"
28+
"update-api": "npm run fetch-api && npm run generate-api"
2229
},
2330
"keywords": [
2431
"codacy",
2532
"cli",
2633
"code-quality",
27-
"static-analysis"
34+
"static-analysis",
35+
"code-review",
36+
"security",
37+
"linting"
2838
],
29-
"author": "",
39+
"author": "Codacy <support@codacy.com> (https://www.codacy.com)",
3040
"license": "ISC",
3141
"engines": {
3242
"node": ">=18"

tsconfig.build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"node_modules",
55
"dist",
66
"**/*.test.ts",
7-
"vitest.config.ts"
7+
"vitest.config.mts"
88
]
99
}

0 commit comments

Comments
 (0)