summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorBrendan Allan <[email protected]>2025-12-22 17:08:44 +0800
committerBrendan Allan <[email protected]>2025-12-22 17:08:44 +0800
commitcb1a1fb26c0f496165cde0991a8bab1a038f0f93 (patch)
treebd23cfa9fa0f71243004b36fc36d4d3bc656d85c /.github/workflows
parentaf5ebabd0386da8734ee25462a5157a25341e95c (diff)
downloadopencode-cb1a1fb26c0f496165cde0991a8bab1a038f0f93.tar.gz
opencode-cb1a1fb26c0f496165cde0991a8bab1a038f0f93.zip
try uploading artifacts in workflow
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/publish.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index ebfabf6c4..efef3b273 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -93,6 +93,24 @@ jobs:
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: false
+ - name: "Upload folders as artifacts"
+ id: upload-artifacts
+ shell: bun {0}
+ working-directory: packages/opencode
+ run: |
+ import * as fs from 'fs/promises';
+ import * as path from 'path';
+ import { DefaultArtifactClient } from "@actions/artifact";
+
+ const artifactClient = new DefaultArtifactClient()
+
+ for await (const folder of $`ls ./dist`.lines()) {
+ if (!folder.startsWith("opencode-")) continue
+
+ const files = await Array.fromAsync(await fs.glob(`./dist/${folder}/bin/*`))
+ await artifactClient.uploadArtifact(folder, files, process.cwd())
+ }
+
outputs:
release: ${{ steps.publish.outputs.release }}
tag: ${{ steps.publish.outputs.tag }}