From c2351e308f4d49fadcd6fd2af2847fa3ba9c37c2 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Tue, 21 Jul 2026 19:11:52 -0400 Subject: [PATCH] fix(ci): skip legacy artifacts on v2 --- .github/workflows/publish.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7498bc24c97..180c6b77c05 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -90,11 +90,18 @@ jobs: opencode-app-id: ${{ vars.OPENCODE_APP_ID }} opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} - - name: Build + - name: Build legacy CLI + if: github.ref_name != 'v2' + run: ./packages/opencode/script/build.ts ${{ (github.ref_name == 'beta' && '--sourcemaps') || '' }} + env: + OPENCODE_VERSION: ${{ needs.version.outputs.version }} + OPENCODE_RELEASE: ${{ needs.version.outputs.release }} + GH_REPO: ${{ needs.version.outputs.repo }} + GH_TOKEN: ${{ steps.committer.outputs.token }} + + - name: Build preview CLI id: build - run: | - ./packages/opencode/script/build.ts ${{ (github.ref_name == 'beta' && '--sourcemaps') || '' }} - ./packages/cli/script/build.ts ${{ (github.ref_name == 'beta' && '--sourcemaps') || '' }} + run: ./packages/cli/script/build.ts ${{ (github.ref_name == 'beta' && '--sourcemaps') || '' }} env: OPENCODE_VERSION: ${{ needs.version.outputs.version }} OPENCODE_RELEASE: ${{ needs.version.outputs.release }} @@ -102,6 +109,7 @@ jobs: GH_TOKEN: ${{ steps.committer.outputs.token }} - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + if: github.ref_name != 'v2' with: name: opencode-cli path: | @@ -109,6 +117,7 @@ jobs: packages/opencode/dist/opencode-linux* - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + if: github.ref_name != 'v2' with: name: opencode-cli-windows path: packages/opencode/dist/opencode-windows* @@ -491,11 +500,13 @@ jobs: registry-url: "https://registry.npmjs.org" - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + if: github.ref_name != 'v2' with: name: opencode-cli path: packages/opencode/dist - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + if: github.ref_name != 'v2' with: name: opencode-cli-windows path: packages/opencode/dist