summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2026-01-30 09:56:06 -0500
committerDax Raad <[email protected]>2026-01-30 09:56:06 -0500
commit9493316502729292be463d55553c01c30edd5595 (patch)
tree0e1696493787a24188eb59259ac63e7f01cf7793
parent08fa7f71884702df9ee2e69a840a1eaeb5685df7 (diff)
downloadopencode-9493316502729292be463d55553c01c30edd5595.tar.gz
opencode-9493316502729292be463d55553c01c30edd5595.zip
ci
-rw-r--r--.github/workflows/test-homebrew-clone.yml39
-rwxr-xr-xpackages/opencode/script/publish.ts12
2 files changed, 50 insertions, 1 deletions
diff --git a/.github/workflows/test-homebrew-clone.yml b/.github/workflows/test-homebrew-clone.yml
new file mode 100644
index 000000000..309e32063
--- /dev/null
+++ b/.github/workflows/test-homebrew-clone.yml
@@ -0,0 +1,39 @@
+name: test-homebrew-clone
+
+on:
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+jobs:
+ clone:
+ runs-on: blacksmith-4vcpu-ubuntu-2404
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Setup git committer
+ id: committer
+ uses: ./.github/actions/setup-git-committer
+ with:
+ opencode-app-id: ${{ vars.OPENCODE_APP_ID }}
+ opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }}
+
+ - name: Verify token present
+ run: |
+ if [ -z "${GITHUB_TOKEN}" ]; then
+ echo "GITHUB_TOKEN is missing"
+ exit 1
+ fi
+ echo "GITHUB_TOKEN is present"
+ env:
+ GITHUB_TOKEN: ${{ steps.committer.outputs.token }}
+
+ - name: Clone homebrew tap
+ run: |
+ tap="https://x-access-token:${GITHUB_TOKEN}@github.com/anomalyco/homebrew-tap.git"
+ git clone "${tap}" ./dist/homebrew-tap
+ cd ./dist/homebrew-tap
+ git status -sb
+ env:
+ GITHUB_TOKEN: ${{ steps.committer.outputs.token }}
diff --git a/packages/opencode/script/publish.ts b/packages/opencode/script/publish.ts
index 8cdeb35b4..9e3eadf87 100755
--- a/packages/opencode/script/publish.ts
+++ b/packages/opencode/script/publish.ts
@@ -37,6 +37,7 @@ await Bun.file(`./dist/${pkg.name}/package.json`).write(
),
)
+/*
const tasks = Object.entries(binaries).map(async ([name]) => {
if (process.platform !== "win32") {
await $`chmod -R 755 .`.cwd(`./dist/${name}`)
@@ -52,6 +53,7 @@ const platforms = "linux/amd64,linux/arm64"
const tags = [`${image}:${version}`, `${image}:${Script.channel}`]
const tagFlags = tags.flatMap((t) => ["-t", t])
await $`docker buildx build --platform ${platforms} ${tagFlags} --push .`
+*/
// registries
if (!Script.preview) {
@@ -63,6 +65,7 @@ if (!Script.preview) {
const [pkgver, _subver = ""] = Script.version.split(/(-.*)/, 2)
+ /*
// arch
const binaryPkgbuild = [
"# Maintainer: dax",
@@ -176,6 +179,7 @@ if (!Script.preview) {
}
}
}
+ */
// Homebrew formula
const homebrewFormula = [
@@ -230,8 +234,14 @@ if (!Script.preview) {
"",
].join("\n")
+ const token = process.env.GITHUB_TOKEN
+ if (!token) {
+ console.error("GITHUB_TOKEN is required to update homebrew tap")
+ process.exit(1)
+ }
+ const tap = `https://x-access-token:${token}@github.com/anomalyco/homebrew-tap.git`
await $`rm -rf ./dist/homebrew-tap`
- await $`git clone https://${process.env["GITHUB_TOKEN"]}@github.com/sst/homebrew-tap.git ./dist/homebrew-tap`
+ await $`git clone ${tap} ./dist/homebrew-tap`
await Bun.file("./dist/homebrew-tap/opencode.rb").write(homebrewFormula)
await $`cd ./dist/homebrew-tap && git add opencode.rb`
await $`cd ./dist/homebrew-tap && git commit -m "Update to v${Script.version}"`