summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFrank <[email protected]>2025-07-16 15:36:23 +0800
committerFrank <[email protected]>2025-07-16 15:36:23 +0800
commit20b8efcc50477dbeef65746d22c349fd9e5ac754 (patch)
tree416d47bdac53cf078cef4751f02d1f2cddc1734e
parenta86d42149f52e4cb2b595016d1e81f04a0ecba3b (diff)
downloadopencode-20b8efcc50477dbeef65746d22c349fd9e5ac754.tar.gz
opencode-20b8efcc50477dbeef65746d22c349fd9e5ac754.zip
wip: github actions
-rw-r--r--.github/workflows/publish-github-action.yml24
-rwxr-xr-xpackages/opencode/script/publish-github-action.ts8
-rw-r--r--packages/opencode/src/cli/cmd/install-github.ts2
3 files changed, 29 insertions, 5 deletions
diff --git a/.github/workflows/publish-github-action.yml b/.github/workflows/publish-github-action.yml
new file mode 100644
index 000000000..7c486097d
--- /dev/null
+++ b/.github/workflows/publish-github-action.yml
@@ -0,0 +1,24 @@
+name: publish-github-action
+
+on:
+ workflow_dispatch:
+
+concurrency: ${{ github.workflow }}-${{ github.ref }}
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - run: git fetch --force --tags
+
+ - uses: oven-sh/setup-bun@v2
+ with:
+ bun-version: 1.2.17
+
+ - name: Publish
+ run: ./script/publish-github-action.ts
+ working-directory: ./packages/opencode
diff --git a/packages/opencode/script/publish-github-action.ts b/packages/opencode/script/publish-github-action.ts
index 2c4eb7c71..dc0e4099d 100755
--- a/packages/opencode/script/publish-github-action.ts
+++ b/packages/opencode/script/publish-github-action.ts
@@ -2,7 +2,7 @@
import { $ } from "bun"
-await $`git tag -d v1`
-await $`git push origin :refs/tags/v1`
-await $`git tag -a v1 -m "Update v1 to latest"`
-await $`git push origin v1`
+await $`git tag -d github-v1`
+await $`git push origin :refs/tags/github-v1`
+await $`git tag -a github-v1 -m "Update github-v1 to latest"`
+await $`git push origin github-v1`
diff --git a/packages/opencode/src/cli/cmd/install-github.ts b/packages/opencode/src/cli/cmd/install-github.ts
index 18c295d63..6e60ad722 100644
--- a/packages/opencode/src/cli/cmd/install-github.ts
+++ b/packages/opencode/src/cli/cmd/install-github.ts
@@ -231,7 +231,7 @@ jobs:
fetch-depth: 1
- name: Run opencode
- uses: sst/opencode/sdks/github@dev${envStr}
+ uses: sst/opencode/sdks/github@github-v1${envStr}
with:
model: ${provider}/${model}
`.trim(),