Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions .github/workflows/release-vscode-companion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.<id>, it is used as-is; otherwise a timestamp is appended.'
required: false
type: 'boolean'
default: false
Expand Down Expand Up @@ -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.<id>, 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"
Expand All @@ -119,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' }}
Expand Down Expand Up @@ -279,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'
Expand Down