@@ -53270,6 +53270,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
53270
53270
return (mod && mod.__esModule) ? mod : { "default": mod };
53271
53271
};
53272
53272
Object.defineProperty(exports, "__esModule", ({ value: true }));
53273
+ const node_path_1 = __nccwpck_require__(9411);
53273
53274
const core = __importStar(__nccwpck_require__(6108));
53274
53275
const exec_1 = __nccwpck_require__(9629);
53275
53276
const read_1 = __importDefault(__nccwpck_require__(1746));
@@ -53346,6 +53347,7 @@ function main() {
53346
53347
}
53347
53348
fs.writeFileSync(rootPackageJsonPath, JSON.stringify(rootPackageJson, null, 2), 'utf8');
53348
53349
const versionTemplate = core.getInput('version_template');
53350
+ const packagePathByName = {};
53349
53351
// 변경된 패키지들의 버전을 강제로 치환합니다
53350
53352
changedPackageInfos.forEach((packageJsonPath) => {
53351
53353
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
@@ -53367,6 +53369,7 @@ function main() {
53367
53369
});
53368
53370
core.info(`✅ [${packageJson.name}] Previous version: ${packageJson.version} / 😘 Next version: ${newVersion}`);
53369
53371
packageJson.version = newVersion;
53372
+ packagePathByName[packageJson.name] = (0, node_path_1.dirname)(packageJsonPath);
53370
53373
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf8');
53371
53374
});
53372
53375
const dryRun = core.getBooleanInput('dry_run');
@@ -53388,7 +53391,12 @@ function main() {
53388
53391
const createRelease = core.getBooleanInput('create_release');
53389
53392
createRelease &&
53390
53393
(yield (0, publish_1.createReleaseForTags)({
53391
- tags: publishedPackages.map(({ name, version }) => `${name}@${version}`),
53394
+ packageData: publishedPackages.map(({ name, version }) => ({
53395
+ name,
53396
+ version,
53397
+ tag: `${name}@${version}`,
53398
+ packagePath: packagePathByName[name],
53399
+ })),
53392
53400
baseSha: pullRequestInfo.base.sha,
53393
53401
headSha: pullRequestInfo.head.sha,
53394
53402
}));
@@ -53661,15 +53669,17 @@ function getPublishedPackageInfos({ packagesDir, execOutput, language, }) {
53661
53669
/**
53662
53670
* changeset 변경 파일 커밋만 제외하고 작업 커밋 로그만 추출
53663
53671
*/
53664
- function getFilteredCommitMessages({ baseSha, headSha }) {
53672
+ function getFilteredCommitMessages({ baseSha, headSha, packagePath, packageName, }) {
53665
53673
// 커밋 해시 목록만 추출
53666
- const shas = (0, node_child_process_1.execSync)(`git log --reverse --pretty=format:"%H" ${baseSha}..${headSha}`, { encoding: 'utf8' })
53674
+ const shas = (0, node_child_process_1.execSync)(`git log --reverse --pretty=format:"%H" ${baseSha}..${headSha} -- ${packagePath}`, {
53675
+ encoding: 'utf8',
53676
+ })
53667
53677
.split('\n')
53668
53678
.filter(Boolean);
53669
53679
const messages = [
53670
53680
'## 🚧 Pre-release',
53671
53681
'',
53672
- `This release is a **pre-release** version.`,
53682
+ `This release is a **pre-release** version of ${packageName} .`,
53673
53683
'Please make sure to thoroughly test it before deploying to production.',
53674
53684
'',
53675
53685
'### Changes',
@@ -53690,8 +53700,8 @@ function getFilteredCommitMessages({ baseSha, headSha }) {
53690
53700
return messages.join('\n');
53691
53701
}
53692
53702
function createReleaseForTags(_a) {
53693
- return __awaiter(this, arguments, void 0, function* ({ tags , baseSha, headSha, }) {
53694
- for (const tag of tags ) {
53703
+ return __awaiter(this, arguments, void 0, function* ({ packageData , baseSha, headSha, }) {
53704
+ for (const { tag, packagePath, name } of packageData ) {
53695
53705
// 이미 Release가 생성된 태그는 건너뜀
53696
53706
try {
53697
53707
yield (0, exec_1.exec)('gh', ['release', 'view', tag]);
@@ -53702,7 +53712,7 @@ function createReleaseForTags(_a) {
53702
53712
// IGNORE: release가 없으면 진행
53703
53713
}
53704
53714
// 커밋 로그 추출하여 릴리즈 노트 생성
53705
- const notes = getFilteredCommitMessages({ baseSha, headSha });
53715
+ const notes = getFilteredCommitMessages({ baseSha, headSha, packagePath, packageName: name });
53706
53716
/**
53707
53717
* GitHub Release 생성
53708
53718
* @see https://cli.github.com/manual/gh_release_create
@@ -54325,6 +54335,14 @@ module.exports = require("node:events");
54325
54335
54326
54336
/***/ }),
54327
54337
54338
+ /***/ 9411:
54339
+ /***/ ((module) => {
54340
+
54341
+ "use strict";
54342
+ module.exports = require("node:path");
54343
+
54344
+ /***/ }),
54345
+
54328
54346
/***/ 4492:
54329
54347
/***/ ((module) => {
54330
54348
0 commit comments