Skip to content

Commit 25e02c4

Browse files
committed
fix: restore original package.json after release
1 parent 1053b52 commit 25e02c4

File tree

2 files changed

+73
-43
lines changed

2 files changed

+73
-43
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,21 @@ jobs:
3232
- name: Build
3333
run: npm run build
3434

35+
- name: Save original package.json
36+
run: cp package.json package.json.bak
37+
3538
- name: Release
3639
env:
3740
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3841
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3942
run: npx semantic-release
4043

41-
- name: Commit changes from semantic-release
42-
if: success()
44+
- name: Restore original package.json
45+
if: always()
4346
run: |
44-
git config --global user.name 'github-actions[bot]'
45-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
46-
git add .
47-
git commit -m "chore: update package.json for release [skip ci]" || echo "No changes to commit"
47+
mv package.json.bak package.json || echo "No backup file to restore"
48+
git add package.json
49+
git commit -m "fix: restore original package.json [skip ci]" || echo "No changes to commit"
4850
git push origin main
4951
5052
- name: Sync dev branch with main

package.json

Lines changed: 65 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,67 @@
11
{
2-
"version": "1.2.2",
3-
"name": "modular-cli-menu",
4-
"description": "",
5-
"keywords": [
6-
"nodejs",
7-
"cli",
8-
"modular",
9-
"command-line",
10-
"menu",
11-
"inquirer ",
12-
"terminal"
13-
],
14-
"author": "Loris Salvi",
15-
"license": "MIT",
16-
"homepage": "https://github.com/BlorisL/modular-cli-menu/blob/main/README.md",
17-
"repository": {
18-
"type": "git",
19-
"url": "https://github.com/blorisl/modular-cli-menu.git"
20-
},
21-
"types": "./dist/types.d.ts",
22-
"main": "./dist/menu.mjs",
23-
"module": "./dist/menu.mjs",
24-
"exports": {
25-
"import": {
26-
"types": "./dist/menu.d.ts",
27-
"default": "./dist/menu.mjs"
2+
"version": "1.2.1",
3+
"name": "modular-cli-menu",
4+
"description": "",
5+
"keywords": [
6+
"nodejs",
7+
"cli",
8+
"modular",
9+
"command-line",
10+
"menu",
11+
"inquirer ",
12+
"terminal"
13+
],
14+
"author": "Loris Salvi",
15+
"license": "MIT",
16+
"homepage": "https://github.com/BlorisL/modular-cli-menu/blob/main/README.md",
17+
"repository": {
18+
"type": "git",
19+
"url": "https://github.com/blorisl/modular-cli-menu.git"
20+
},
21+
"dependencies": {
22+
"@inquirer/checkbox": "^4.1.6",
23+
"@inquirer/input": "^4.1.10",
24+
"@inquirer/select": "^4.2.1",
25+
"@types/inquirer": "^9.0.7",
26+
"chalk": "^5.4.1",
27+
"dotenv": "^16.4.5",
28+
"inquirer": "^9.2.12"
29+
},
30+
"devDependencies": {
31+
"@semantic-release/changelog": "^6.0.3",
32+
"@semantic-release/git": "^10.0.1",
33+
"@semantic-release/npm": "^12.0.1",
34+
"@types/node": "^20.9.0",
35+
"clean-pkg-json": "^1.3.0",
36+
"pkgroll": "^2.12.2",
37+
"semantic-release": "^24.2.4",
38+
"tsx": "^4.19.3",
39+
"typescript": "^5.2.2"
40+
},
41+
"types": "./dist/types.d.ts",
42+
"main": "./dist/menu.mjs",
43+
"module": "./dist/menu.mjs",
44+
"exports": {
45+
"import": {
46+
"types": "./dist/menu.d.ts",
47+
"default": "./dist/menu.mjs"
48+
}
49+
},
50+
"bin": {
51+
"modular-cli-menu": "./dist/menu.mjs"
52+
},
53+
"files": [
54+
"package.json",
55+
"dist",
56+
"README.md",
57+
"LICENSE"
58+
],
59+
"scripts": {
60+
"dev": "tsx src/index.ts",
61+
"build": "npx pkgroll --clean-dist --minify --env.DEBUG_LOG=false",
62+
"build:en": "npx pkgroll --clean-dist --minify --env.DEBUG_LOG=false --env.MENU_LANGUAGE=it",
63+
"build:it": "npx pkgroll --clean-dist --minify --env.DEBUG_LOG=false --env.MENU_LANGUAGE=it",
64+
"pack:test": "npm pack --dry-run",
65+
"prepack": "clean-pkg-json -r dependencies"
2866
}
29-
},
30-
"bin": {
31-
"modular-cli-menu": "./dist/menu.mjs"
32-
},
33-
"files": [
34-
"package.json",
35-
"dist",
36-
"README.md",
37-
"LICENSE"
38-
]
39-
}
67+
}

0 commit comments

Comments
 (0)