From f964c2a26b9f26ff2b0f45e61cda225613a67f84 Mon Sep 17 00:00:00 2001 From: tanzhenxin Date: Fri, 30 Jan 2026 11:05:35 +0800 Subject: [PATCH 1/3] fix(ci): honor manual preview version input When create_preview_release is enabled, allow the workflow_dispatch version input to control the preview version (and avoid appending a timestamp if a preview id is already provided) to match user intent. --- .../workflows/release-vscode-companion.yml | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-vscode-companion.yml b/.github/workflows/release-vscode-companion.yml index 2e0c4b60e..57ee0aefb 100644 --- a/.github/workflows/release-vscode-companion.yml +++ b/.github/workflows/release-vscode-companion.yml @@ -18,7 +18,7 @@ on: type: 'boolean' default: true create_preview_release: - description: 'Auto apply the preview release tag, input version is ignored.' + description: 'Create a preview release. If version includes -preview., it is used as-is; otherwise a timestamp is appended.' required: false type: 'boolean' default: false @@ -93,10 +93,24 @@ jobs: BASE_VERSION=$(node -p "require('./package.json').version") if [[ "${IS_PREVIEW}" == "true" ]]; then - # Generate preview version with timestamp based on actual package version - TIMESTAMP=$(date +%Y%m%d%H%M%S) - PREVIEW_VERSION="${BASE_VERSION}-preview.${TIMESTAMP}" - RELEASE_TAG="preview.${TIMESTAMP}" + # Generate preview version. If a manual version is provided and already + # contains -preview., use it as-is (no timestamp). Otherwise, append + # a timestamp for uniqueness. + if [[ -n "${MANUAL_VERSION}" ]]; then + MANUAL_CLEAN="${MANUAL_VERSION#v}" # Remove 'v' prefix if present + if [[ "${MANUAL_CLEAN}" == *"-preview."* ]]; then + PREVIEW_VERSION="${MANUAL_CLEAN}" + else + PREVIEW_BASE="${MANUAL_CLEAN%%-*}" # Strip any prerelease/build + TIMESTAMP=$(date +%Y%m%d%H%M%S) + PREVIEW_VERSION="${PREVIEW_BASE}-preview.${TIMESTAMP}" + fi + else + TIMESTAMP=$(date +%Y%m%d%H%M%S) + PREVIEW_VERSION="${BASE_VERSION}-preview.${TIMESTAMP}" + fi + + RELEASE_TAG="${PREVIEW_VERSION}" echo "RELEASE_TAG=${RELEASE_TAG}" >> "$GITHUB_OUTPUT" echo "RELEASE_VERSION=${PREVIEW_VERSION}" >> "$GITHUB_OUTPUT" From 2779faf0103f6dc8e594e4f827f79fbe2eb701f2 Mon Sep 17 00:00:00 2001 From: yiliang114 <1204183885@qq.com> Date: Fri, 30 Jan 2026 11:32:51 +0800 Subject: [PATCH 2/3] chore(ci): add webui dependency build step in release workflow Co-authored-by: Qwen-Coder --- .github/workflows/release-vscode-companion.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release-vscode-companion.yml b/.github/workflows/release-vscode-companion.yml index 57ee0aefb..8b8d1ea24 100644 --- a/.github/workflows/release-vscode-companion.yml +++ b/.github/workflows/release-vscode-companion.yml @@ -133,6 +133,12 @@ jobs: IS_PREVIEW: '${{ steps.vars.outputs.is_preview }}' MANUAL_VERSION: '${{ inputs.version }}' + - name: 'Build webui dependency' + if: |- + ${{ github.event.inputs.force_skip_tests != 'true' }} + run: | + npm run build --workspace=@qwen-code/webui + - name: 'Run Tests' if: |- ${{ github.event.inputs.force_skip_tests != 'true' }} From 44b7dad966f3bb7ddf55f7bf312a021aba088051 Mon Sep 17 00:00:00 2001 From: tanzhenxin Date: Tue, 3 Feb 2026 15:10:38 +0800 Subject: [PATCH 3/3] fix(ci): add --skip-duplicate flag to vsce publish Prevents workflow failure when some platform VSIXes are already published (e.g., darwin-arm64, darwin-x64) during retry runs. Co-authored-by: Qwen-Coder --- .github/workflows/release-vscode-companion.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-vscode-companion.yml b/.github/workflows/release-vscode-companion.yml index 8b8d1ea24..ea02b01fb 100644 --- a/.github/workflows/release-vscode-companion.yml +++ b/.github/workflows/release-vscode-companion.yml @@ -299,7 +299,7 @@ jobs: echo "Publishing to Microsoft Marketplace..." for vsix in vsix-artifacts/*.vsix; do echo "Publishing: ${vsix}" - vsce publish --packagePath "${vsix}" --pat "${VSCE_PAT}" + vsce publish --packagePath "${vsix}" --pat "${VSCE_PAT}" --skip-duplicate done - name: 'Publish to OpenVSX'