The open source coding agent.
TypeScript
sync
Dax Raade03ad6c42ea3
diff --git a/packages/opencode/script/publish.ts b/packages/opencode/script/publish.tsindex 81f942a0315..2bb7e742513 100755--- a/packages/opencode/script/publish.ts+++ b/packages/opencode/script/publish.ts@@ -1,7 +1,6 @@#!/usr/bin/env bunimport { $ } from "bun"-import { Glob } from "bun"import pkg from "../package.json"@@ -91,8 +90,30 @@ if (!snapshot) {await $`cd dist/${key}/bin && zip -r ../../${key}.zip *`}- const files = Object.keys(optionalDependencies)- .map((key) => `dist/${key}.zip`)- .join(" ")- await $`gh release create v${version} --title "Release v${version}" --generate-notes ./dist/*.zip`+ const previous = await fetch(+ "https://api.github.com/repos/sst/opencode/releases/latest",+ )+ .then((res) => res.json())+ .then((data) => data.tag_name)++ const commits = await fetch(+ `https://api.github.com/repos/sst/opencode/compare/${previous}...HEAD`,+ )+ .then((res) => res.json())+ .then((data) => data.commits || [])++ const notes = commits+ .map((commit: any) => `- ${commit.commit.message.split("\n")[0]}`)+ .filter((x: string) => {+ const lower = x.toLowerCase()+ return (+ !lower.includes("chore:") &&+ !lower.includes("ci:") &&+ !lower.includes("docs:")+ )+ })+ .join("\n")++ if (!dry)+ await $`gh release create v${version} --title "v${version}" --notes ${notes} ./dist/*.zip`}