chore(release): publish packages from CI
This commit is contained in:
@@ -10,11 +10,12 @@
|
||||
* 1. Check for uncommitted changes
|
||||
* 2. Bump version via npm run version:xxx or set an explicit version
|
||||
* 3. Update CHANGELOG.md files: [Unreleased] -> [version] - date
|
||||
* 4. Generate the coding-agent npm-shrinkwrap.json
|
||||
* 5. Commit and tag
|
||||
* 6. Publish to npm
|
||||
* 4. Regenerate release artifacts
|
||||
* 5. Run checks
|
||||
* 6. Commit and tag the release
|
||||
* 7. Add new [Unreleased] section to changelogs
|
||||
* 8. Commit
|
||||
* 8. Commit next-cycle changelog updates
|
||||
* 9. Push main and the tag to trigger CI publishing
|
||||
*/
|
||||
|
||||
import { execSync } from "child_process";
|
||||
@@ -91,7 +92,7 @@ function bumpOrSetVersion(target) {
|
||||
}
|
||||
|
||||
console.log(`Setting explicit version (${target})...`);
|
||||
run(`npm version ${target} -ws --no-git-tag-version && node scripts/sync-versions.js && npm install --package-lock-only`);
|
||||
run(`npm version ${target} -ws --no-git-tag-version && node scripts/sync-versions.js && npm install --package-lock-only --ignore-scripts`);
|
||||
return getVersion();
|
||||
}
|
||||
|
||||
@@ -163,23 +164,25 @@ console.log("Updating CHANGELOG.md files...");
|
||||
updateChangelogsForRelease(version);
|
||||
console.log();
|
||||
|
||||
// 4. Generate publish shrinkwrap
|
||||
console.log("Generating coding-agent shrinkwrap...");
|
||||
// 4. Regenerate release artifacts
|
||||
console.log("Regenerating release artifacts...");
|
||||
run("npm --prefix packages/ai run generate-models");
|
||||
run("npm --prefix packages/ai run generate-image-models");
|
||||
run("npm run shrinkwrap:coding-agent");
|
||||
console.log();
|
||||
|
||||
// 5. Commit and tag
|
||||
// 5. Run checks
|
||||
console.log("Running checks...");
|
||||
run("npm run check");
|
||||
console.log();
|
||||
|
||||
// 6. Commit and tag
|
||||
console.log("Committing and tagging...");
|
||||
stageChangedFiles();
|
||||
run(`git commit -m "Release v${version}"`);
|
||||
run(`git tag v${version}`);
|
||||
console.log();
|
||||
|
||||
// 6. Publish
|
||||
console.log("Publishing to npm...");
|
||||
run("npm run publish");
|
||||
console.log();
|
||||
|
||||
// 7. Add new [Unreleased] sections
|
||||
console.log("Adding [Unreleased] sections for next cycle...");
|
||||
addUnreleasedSection();
|
||||
@@ -197,4 +200,4 @@ run("git push origin main");
|
||||
run(`git push origin v${version}`);
|
||||
console.log();
|
||||
|
||||
console.log(`=== Released v${version} ===`);
|
||||
console.log(`=== Prepared release v${version}; CI publishing starts after the tag push ===`);
|
||||
|
||||
Reference in New Issue
Block a user