Przeglądaj źródła

wip: github actions

Frank 7 miesięcy temu
rodzic
commit
20b8efcc50

+ 24 - 0
.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

+ 4 - 4
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`

+ 1 - 1
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(),