mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 21:20:44 +00:00
Merge pull request #1665 from QwenLM/fix/vscode-companion-preview-version-input
fix(ci): honor manual preview version input
This commit is contained in:
commit
e92ad3e367
1 changed files with 26 additions and 6 deletions
32
.github/workflows/release-vscode-companion.yml
vendored
32
.github/workflows/release-vscode-companion.yml
vendored
|
|
@ -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
|
||||
|
|
@ -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"
|
||||
|
|
@ -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' }}
|
||||
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue