File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 9393 GITHUB_TOKEN : ${{ secrets.SST_GITHUB_TOKEN }}
9494 NPM_CONFIG_PROVENANCE : false
9595
96+ - name : " Upload folders as artifacts"
97+ id : upload-artifacts
98+ shell : bun {0}
99+ working-directory : packages/opencode
100+ run : |
101+ import * as fs from 'fs/promises';
102+ import * as path from 'path';
103+ import { DefaultArtifactClient } from "@actions/artifact";
104+
105+ const artifactClient = new DefaultArtifactClient()
106+
107+ for await (const folder of $`ls ./dist`.lines()) {
108+ if (!folder.startsWith("opencode-")) continue
109+
110+ const files = await Array.fromAsync(await fs.glob(`./dist/${folder}/bin/*`))
111+ await artifactClient.uploadArtifact(folder, files, process.cwd())
112+ }
113+
96114 outputs :
97115 release : ${{ steps.publish.outputs.release }}
98116 tag : ${{ steps.publish.outputs.tag }}
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import { $ } from "bun"
33import pkg from "../package.json"
44import { Script } from "@opencode-ai/script"
55import { fileURLToPath } from "url"
6- import { glob } from "fs/promises"
76
87const dir = fileURLToPath ( new URL ( ".." , import . meta. url ) )
98process . chdir ( dir )
You can’t perform that action at this time.
0 commit comments