mirror of
https://github.com/sst/opencode.git
synced 2025-08-01 04:12:16 +00:00
wip: github actions
This commit is contained in:
parent
cb032cff2b
commit
7ac0a2bc65
4 changed files with 18 additions and 11 deletions
2
.github/workflows/opencode.yml
vendored
2
.github/workflows/opencode.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Run opencode
|
- name: Run opencode
|
||||||
uses: sst/opencode/sdks/github@dev
|
uses: sst/opencode/sdks/github@github-v1
|
||||||
env:
|
env:
|
||||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
with:
|
with:
|
||||||
|
|
3
.github/workflows/publish-github-action.yml
vendored
3
.github/workflows/publish-github-action.yml
vendored
|
@ -26,5 +26,4 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "opencode@sst.dev"
|
git config --global user.email "opencode@sst.dev"
|
||||||
git config --global user.name "opencode"
|
git config --global user.name "opencode"
|
||||||
./script/publish-github-action.ts
|
./scripts/publish-github-action.ts
|
||||||
working-directory: ./packages/opencode
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/usr/bin/env bun
|
|
||||||
|
|
||||||
import { $ } from "bun"
|
|
||||||
|
|
||||||
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`
|
|
16
scripts/publish-github-action.ts
Executable file
16
scripts/publish-github-action.ts
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bun
|
||||||
|
|
||||||
|
import { $ } from "bun"
|
||||||
|
|
||||||
|
try {
|
||||||
|
await $`git tag -d github-v1`
|
||||||
|
await $`git push origin :refs/tags/github-v1`
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Error && e.message.includes("not found")) {
|
||||||
|
console.log("tag not found, continuing...")
|
||||||
|
} else {
|
||||||
|
throw e
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await $`git tag -a github-v1 -m "Update github-v1 to latest"`
|
||||||
|
await $`git push origin github-v1`
|
Loading…
Add table
Add a link
Reference in a new issue