This commit is contained in:
Dax Raad
2026-01-29 11:31:50 -05:00
parent 8969581e2c
commit 7de4105285
2 changed files with 15 additions and 13 deletions

View File

@@ -76,9 +76,7 @@ jobs:
path: packages/opencode/dist
outputs:
release: ${{ steps.build-cli.outputs.release }}
tag: ${{ steps.publish.outputs.tag }}
version: ${{ steps.publish.outputs.version }}
version: ${{ needs.version.outputs.version }}
build-tauri:
if: false
@@ -233,7 +231,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ needs.publish.outputs.tag }}
ref: ${{ needs.version.outputs.tag }}
- uses: ./.github/actions/setup-bun
@@ -263,6 +261,7 @@ jobs:
- run: ./script/publish.ts
env:
OPENCODE_VERSION: ${{ needs.version.outputs.version }}
OPENCODE_RELEASE_ID: ${{ needs.version.outputs.release }}
AUR_KEY: ${{ secrets.AUR_KEY }}
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}

View File

@@ -65,17 +65,20 @@ await Bun.file(extensionToml).write(toml)
await $`bun install`
await import(`../packages/sdk/js/script/build.ts`)
if (!Script.preview || true) {
await $`git commit -am "release: v${Script.version}"`
await $`git tag v${Script.version}`
await $`git fetch origin`
await $`git cherry-pick HEAD..origin/dev`.nothrow()
await $`git push origin HEAD --tags --no-verify --force-with-lease`
await new Promise((resolve) => setTimeout(resolve, 5_000))
await $`gh release edit v${Script.version} --draft --title "v${Script.version}" --notes ${notes.join("\n") || "No notable changes"}`
await $`gh release upload v${Script.version} ./packages/opencode/dist/*.zip ./packages/opencode/dist/*.tar.gz --clobber`
await $`git commit -am "release: v${Script.version}"`
await $`git tag v${Script.version}`
await $`git fetch origin`
await $`git cherry-pick HEAD..origin/dev`.nothrow()
await $`git push origin HEAD --tags --no-verify --force-with-lease`
await new Promise((resolve) => setTimeout(resolve, 5_000))
const releaseID = process.env.OPENCODE_RELEASE_ID
if (!releaseID) {
throw new Error("OPENCODE_RELEASE_ID environment variable is required")
}
await $`gh release edit ${releaseID} --draft --title "v${Script.version}" --notes ${notes.join("\n") || "No notable changes"}`
await $`gh release upload v${Script.version} ./packages/opencode/dist/*.zip ./packages/opencode/dist/*.tar.gz --clobber`
console.log("\n=== cli ===\n")
await import(`../packages/opencode/script/publish.ts`)