Skip to content

Commit e07254a

Browse files
committed
Fix release workflow to include changelog in version commit
- Move release-tag.js execution to version script - Include CHANGELOG.md in version commit - Move git push to postversion hook - Remove redundant staging from release-tag.js
1 parent b1ca4fd commit e07254a

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
"postbuild": "echo '{\"type\": \"commonjs\"}' > lib/cjs/package.json",
4242
"prepare": "npm run build",
4343
"preversion": "npm run test:local",
44-
"version": "sed -i'' \"s/VERSION = .*/VERSION = '$npm_package_version'/\" src/amqp-base-client.ts && git add src/amqp-base-client.ts",
45-
"postversion": "node scripts/release-tag.js",
46-
"release": "npm version patch && git push && git push --tags",
47-
"release:minor": "npm version minor && git push && git push --tags",
48-
"release:major": "npm version major && git push && git push --tags"
44+
"version": "sed -i'' \"s/VERSION = .*/VERSION = '$npm_package_version'/\" src/amqp-base-client.ts && node scripts/release-tag.js && git add src/amqp-base-client.ts CHANGELOG.md",
45+
"postversion": "git push && git push --tags",
46+
"release": "npm version patch",
47+
"release:minor": "npm version minor",
48+
"release:major": "npm version major"
4949
},
5050
"files": [
5151
"src/",

scripts/release-tag.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ function main() {
3333

3434
// Write updated changelog back to file
3535
fs.writeFileSync("CHANGELOG.md", changelog, "utf8")
36-
37-
// Stage the changelog file for commit
38-
execSync("git add CHANGELOG.md", { stdio: "inherit" })
39-
console.log("✅ Updated CHANGELOG.md and staged for commit")
36+
console.log("✅ Updated CHANGELOG.md")
4037
}
4138

4239
// Find the section for this version

0 commit comments

Comments
 (0)