Skip to content

Commit 68b09b3

Browse files
committed
ci: replace with just upload-artifact whole dir
1 parent 92ade2a commit 68b09b3

File tree

1 file changed

+4
-31
lines changed

1 file changed

+4
-31
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,6 @@ jobs:
6969
git config --global user.name "opencode"
7070
git remote set-url origin https://x-access-token:${{ secrets.SST_GITHUB_TOKEN }}@github.com/${{ github.repository }}
7171
72-
- name: "Extract Actions runtime variables"
73-
id: extract-runtime-environment-variables
74-
uses: actions/github-script@v7
75-
env:
76-
github-token: ${{ secrets.GITHUB_TOKEN }}
77-
with:
78-
script: |
79-
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL'])
80-
core.exportVariable('ACTIONS_RUNTIME_URL', process.env['ACTIONS_RUNTIME_URL'])
81-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'])
82-
core.exportVariable('ACTIONS_CACHE_SERVICE_V2', process.env['ACTIONS_CACHE_SERVICE_V2'])
83-
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL'])
84-
8572
- name: Publish
8673
id: publish
8774
run: ./script/publish-start.ts
@@ -93,24 +80,10 @@ jobs:
9380
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
9481
NPM_CONFIG_PROVENANCE: false
9582

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-
import { $ } from "bun";
105-
106-
const artifactClient = new DefaultArtifactClient()
107-
108-
for await (const folder of $`ls ./dist`.lines()) {
109-
if (!folder.startsWith("opencode-")) continue
110-
111-
const files = await Array.fromAsync(await fs.glob(`./dist/${folder}/bin/*`))
112-
await artifactClient.uploadArtifact(folder, files, process.cwd())
113-
}
83+
- uses: actions/upload-artifact@v4
84+
with:
85+
name: opencode-cli
86+
path: packages/opencode/dist
11487

11588
outputs:
11689
release: ${{ steps.publish.outputs.release }}

0 commit comments

Comments
 (0)