-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(installer): add standalone hosted install and uninstall flow #3828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
eb2a9a8
d2e5b1b
d7277a6
5719595
472e51e
47fdfbc
2b40bad
a4a15e1
fee13e4
69e22f9
faa9087
66dec5f
1ca86fe
0eb58a8
e7e3f90
fee51d1
ec654dd
ccf83e9
b078ade
668c006
a205e6c
bbaa8ff
6534e6f
5983d11
6c80ef8
bca4a7f
3570f93
51c14f4
44ac229
f9d9a3b
587dc1f
27a1bbe
51778f9
2e4086a
4100b8e
362bf58
4eb3108
1917316
1502f72
fddbfdc
1f1f5cd
7d4fc13
f6696e8
a244a2e
9bde745
728b35f
bb8b810
55f28b6
d2acf7f
725a06e
a10bd1c
d0bd8c6
926c10a
2ae9d0c
02e5706
34a86bd
2ca9dcd
3549a34
bd7602b
68f05db
439092e
eeabd1b
7b9817a
b8e5490
fedcbae
af64da8
5f649c9
984b1a9
9093577
72a5efe
7d328be
b0ae7f8
48977ae
645edb8
0c8022d
c6005a7
540bcb8
4095171
4b950ab
01e9767
046d200
ccbdd34
24cb1c7
31e3c43
b7f190a
c3b488f
bdf101b
38c4706
564f899
74130fc
75e5b58
d2ebed9
db0a44d
8fb2bc1
db8677f
40ac124
bae9333
a79745b
7fd314a
7d665f3
c959913
b2b43b5
308fe4d
1d272f6
778919f
ecfad99
ce45abd
78d0c86
b3e21a5
0994a80
63ec525
0155a4f
308358d
c2a3e5c
3eb6d6c
625dfbf
3f60c2c
273a012
a1ef869
0a5d308
89b272d
547713a
bab96dc
3caf3e2
4a8fea5
98315b2
584bb59
62ab5f4
b69af67
f832d33
994f2f4
ba695a8
09b04d6
89d58aa
cb3f356
18525b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -57,7 +57,7 @@ jobs: | |||||||||||
|
|
||||||||||||
| steps: | ||||||||||||
| - name: 'Checkout' | ||||||||||||
| uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2 | ||||||||||||
| uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2 | ||||||||||||
| with: | ||||||||||||
| ref: '${{ github.event.inputs.ref || github.sha }}' | ||||||||||||
| fetch-depth: 0 | ||||||||||||
|
|
@@ -89,7 +89,7 @@ jobs: | |||||||||||
| echo "is_dry_run=${is_dry_run}" >> "${GITHUB_OUTPUT}" | ||||||||||||
|
|
||||||||||||
| - name: 'Setup Node.js' | ||||||||||||
| uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0 | ||||||||||||
| uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0 | ||||||||||||
| with: | ||||||||||||
| node-version-file: '.nvmrc' | ||||||||||||
| cache: 'npm' | ||||||||||||
|
|
@@ -153,13 +153,13 @@ jobs: | |||||||||||
|
|
||||||||||||
| steps: | ||||||||||||
| - name: 'Checkout' | ||||||||||||
| uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2 | ||||||||||||
| uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2 | ||||||||||||
| with: | ||||||||||||
| ref: '${{ github.event.inputs.ref || github.sha }}' | ||||||||||||
| fetch-depth: 0 | ||||||||||||
|
|
||||||||||||
| - name: 'Setup Node.js' | ||||||||||||
| uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0 | ||||||||||||
| uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0 | ||||||||||||
| with: | ||||||||||||
| node-version-file: '.nvmrc' | ||||||||||||
| cache: 'npm' | ||||||||||||
|
|
@@ -206,13 +206,13 @@ jobs: | |||||||||||
|
|
||||||||||||
| steps: | ||||||||||||
| - name: 'Checkout' | ||||||||||||
| uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2 | ||||||||||||
| uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2 | ||||||||||||
| with: | ||||||||||||
| ref: '${{ github.event.inputs.ref || github.sha }}' | ||||||||||||
| fetch-depth: 0 | ||||||||||||
|
|
||||||||||||
| - name: 'Setup Node.js' | ||||||||||||
| uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0 | ||||||||||||
| uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0 | ||||||||||||
| with: | ||||||||||||
| node-version-file: '.nvmrc' | ||||||||||||
| cache: 'npm' | ||||||||||||
|
|
@@ -247,13 +247,13 @@ jobs: | |||||||||||
|
|
||||||||||||
| steps: | ||||||||||||
| - name: 'Checkout' | ||||||||||||
| uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2 | ||||||||||||
| uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2 | ||||||||||||
| with: | ||||||||||||
| ref: '${{ github.event.inputs.ref || github.sha }}' | ||||||||||||
| fetch-depth: 0 | ||||||||||||
|
|
||||||||||||
| - name: 'Setup Node.js' | ||||||||||||
| uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0 | ||||||||||||
| uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0 | ||||||||||||
| with: | ||||||||||||
| node-version-file: '.nvmrc' | ||||||||||||
| cache: 'npm' | ||||||||||||
|
|
@@ -317,13 +317,13 @@ jobs: | |||||||||||
|
|
||||||||||||
| steps: | ||||||||||||
| - name: 'Checkout' | ||||||||||||
| uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2 | ||||||||||||
| uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2 | ||||||||||||
| with: | ||||||||||||
| ref: '${{ github.event.inputs.ref || github.sha }}' | ||||||||||||
| fetch-depth: 0 | ||||||||||||
|
|
||||||||||||
| - name: 'Setup Node.js' | ||||||||||||
| uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0 | ||||||||||||
| uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0 | ||||||||||||
| with: | ||||||||||||
| node-version-file: '.nvmrc' | ||||||||||||
| cache: 'npm' | ||||||||||||
|
|
@@ -386,6 +386,63 @@ jobs: | |||||||||||
| RELEASE_VERSION: '${{ needs.prepare.outputs.release_version }}' | ||||||||||||
| run: 'npm run package:standalone:release -- --version "${RELEASE_VERSION}" --out-dir dist/standalone' | ||||||||||||
|
|
||||||||||||
| - name: 'Verify Installation Release Assets' | ||||||||||||
| run: 'npm run verify:installation-release -- --dir dist/standalone' | ||||||||||||
|
|
||||||||||||
| - name: 'Package Hosted Installation Assets' | ||||||||||||
| env: | ||||||||||||
| RELEASE_VERSION: '${{ needs.prepare.outputs.release_version }}' | ||||||||||||
| run: 'npm run package:hosted-installation -- --out-dir dist/installation --version "${RELEASE_VERSION}"' | ||||||||||||
|
|
||||||||||||
| - name: 'Install ossutil' | ||||||||||||
| if: |- | ||||||||||||
| ${{ needs.prepare.outputs.is_dry_run == 'false' }} | ||||||||||||
| env: | ||||||||||||
| OSSUTIL_URL: "${{ vars.OSSUTIL_URL || 'https://gosspublic.alicdn.com/ossutil/1.7.19/ossutil-v1.7.19-linux-amd64.zip' }}" | ||||||||||||
| OSSUTIL_SHA256: "${{ vars.OSSUTIL_SHA256 || 'dcc512e4a893e16bbee63bc769339d8e56b21744fd83c8212a9d8baf28767343' }}" | ||||||||||||
| run: |- | ||||||||||||
| set -euo pipefail | ||||||||||||
|
|
||||||||||||
| tmp_dir="$(mktemp -d)" | ||||||||||||
| curl -fsSL --connect-timeout 15 --max-time 300 "${OSSUTIL_URL}" -o "${tmp_dir}/ossutil.zip" | ||||||||||||
| echo "${OSSUTIL_SHA256} ${tmp_dir}/ossutil.zip" | sha256sum -c - | ||||||||||||
| unzip -q "${tmp_dir}/ossutil.zip" -d "${tmp_dir}" | ||||||||||||
|
|
||||||||||||
| ossutil_path="$(find "${tmp_dir}" -type f \( -name 'ossutil' -o -name 'ossutil64' \) -print -quit)" | ||||||||||||
| if [[ -z "${ossutil_path}" ]]; then | ||||||||||||
| echo "::error::ossutil binary not found in downloaded archive" | ||||||||||||
| exit 1 | ||||||||||||
| fi | ||||||||||||
|
|
||||||||||||
| chmod +x "${ossutil_path}" | ||||||||||||
| mkdir -p "${HOME}/.local/bin" | ||||||||||||
| install -m 0755 "${ossutil_path}" "${HOME}/.local/bin/ossutil" | ||||||||||||
| echo "${HOME}/.local/bin" >> "${GITHUB_PATH}" | ||||||||||||
| rm -rf "${tmp_dir}" | ||||||||||||
| "${HOME}/.local/bin/ossutil" >/dev/null | ||||||||||||
|
|
||||||||||||
| - name: 'Configure Aliyun OSS Credentials' | ||||||||||||
| if: |- | ||||||||||||
| ${{ needs.prepare.outputs.is_dry_run == 'false' }} | ||||||||||||
| env: | ||||||||||||
| ALIYUN_OSS_ACCESS_KEY_ID: '${{ secrets.ALIYUN_OSS_ACCESS_KEY_ID }}' | ||||||||||||
| ALIYUN_OSS_ACCESS_KEY_SECRET: '${{ secrets.ALIYUN_OSS_ACCESS_KEY_SECRET }}' | ||||||||||||
| ALIYUN_OSS_ENDPOINT: "${{ vars.ALIYUN_OSS_ENDPOINT || 'https://oss-cn-hangzhou.aliyuncs.com' }}" | ||||||||||||
| run: |- | ||||||||||||
| set -euo pipefail | ||||||||||||
|
|
||||||||||||
| if [[ -z "${ALIYUN_OSS_ACCESS_KEY_ID}" || -z "${ALIYUN_OSS_ACCESS_KEY_SECRET}" ]]; then | ||||||||||||
| echo "::error::Missing Aliyun OSS credentials. Set ALIYUN_OSS_ACCESS_KEY_ID and ALIYUN_OSS_ACCESS_KEY_SECRET in the production-release environment secrets." | ||||||||||||
| exit 1 | ||||||||||||
| fi | ||||||||||||
|
|
||||||||||||
| ossutil config \ | ||||||||||||
| -e "${ALIYUN_OSS_ENDPOINT}" \ | ||||||||||||
| -i "${ALIYUN_OSS_ACCESS_KEY_ID}" \ | ||||||||||||
| -k "${ALIYUN_OSS_ACCESS_KEY_SECRET}" \ | ||||||||||||
| -L EN \ | ||||||||||||
| -c "${RUNNER_TEMP}/.ossutilconfig" | ||||||||||||
|
|
||||||||||||
| - name: 'Publish @qwen-code/qwen-code' | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] npm publish(第 444 行)在 OSS 同步(第 533 行)之前执行。如果 OSS 上传失败,npm 用户已获得新版本,而 OSS 建议:将 OSS 同步移到 npm publish 之前,或至少添加一个验证步骤:在 npm publish 后确认 OSS 资产已可用,否则回滚 npm 发布。 — DeepSeek/deepseek-v4-pro via Qwen Code /review |
||||||||||||
| working-directory: 'dist' | ||||||||||||
| run: |- | ||||||||||||
|
|
@@ -411,21 +468,139 @@ jobs: | |||||||||||
| IS_NIGHTLY: '${{ needs.prepare.outputs.is_nightly }}' | ||||||||||||
| IS_PREVIEW: '${{ needs.prepare.outputs.is_preview }}' | ||||||||||||
| run: |- | ||||||||||||
| set -euo pipefail | ||||||||||||
|
|
||||||||||||
| PRERELEASE_FLAG="" | ||||||||||||
| if [[ "${IS_NIGHTLY}" == "true" || "${IS_PREVIEW}" == "true" ]]; then | ||||||||||||
| PRERELEASE_FLAG="--prerelease" | ||||||||||||
| fi | ||||||||||||
|
|
||||||||||||
| mapfile -t release_assets < <(node scripts/verify-installation-release.js --dir dist/standalone --list-release-asset-paths) | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion]
Suggested change
— DeepSeek/deepseek-v4-pro via Qwen Code /review
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] Bash Add a guard: if [[ ${#release_assets[@]} -eq 0 ]]; then
echo "::error::Release asset verification produced no assets"
exit 1
fi— qwen-latest-series-invite-beta-v34 via Qwen Code /review
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] This Route through — qwen-latest-series-invite-beta-v34 via Qwen Code /review |
||||||||||||
|
|
||||||||||||
| gh release create "${RELEASE_TAG}" \ | ||||||||||||
| dist/cli.js \ | ||||||||||||
| dist/standalone/qwen-code-* \ | ||||||||||||
| dist/standalone/SHA256SUMS \ | ||||||||||||
| "${release_assets[@]}" \ | ||||||||||||
| --target "${RELEASE_BRANCH}" \ | ||||||||||||
| --title "Release ${RELEASE_TAG}" \ | ||||||||||||
| --notes-start-tag "${PREVIOUS_RELEASE_TAG}" \ | ||||||||||||
| --generate-notes \ | ||||||||||||
| ${PRERELEASE_FLAG} | ||||||||||||
|
|
||||||||||||
| - name: 'Sync Release Assets to Aliyun OSS' | ||||||||||||
| if: |- | ||||||||||||
| ${{ needs.prepare.outputs.is_dry_run == 'false' }} | ||||||||||||
| env: | ||||||||||||
| ALIYUN_OSS_BUCKET: "${{ vars.ALIYUN_OSS_BUCKET || 'qwen-code-assets' }}" | ||||||||||||
| RELEASE_TAG: '${{ needs.prepare.outputs.release_tag }}' | ||||||||||||
| run: |- | ||||||||||||
| set -euo pipefail | ||||||||||||
|
|
||||||||||||
| mapfile -t release_assets < <(node scripts/verify-installation-release.js --dir dist/standalone --list-release-asset-paths) | ||||||||||||
| node scripts/upload-aliyun-oss-assets.js \ | ||||||||||||
| --bucket "${ALIYUN_OSS_BUCKET}" \ | ||||||||||||
| --config "${RUNNER_TEMP}/.ossutilconfig" \ | ||||||||||||
| --prefix "releases/qwen-code/${RELEASE_TAG}" \ | ||||||||||||
| "${release_assets[@]}" | ||||||||||||
|
|
||||||||||||
| - name: 'Verify Aliyun OSS Release Assets' | ||||||||||||
|
yiliang114 marked this conversation as resolved.
|
||||||||||||
| if: |- | ||||||||||||
| ${{ needs.prepare.outputs.is_dry_run == 'false' }} | ||||||||||||
| env: | ||||||||||||
| ALIYUN_OSS_PUBLIC_BASE_URL: "${{ vars.ALIYUN_OSS_PUBLIC_BASE_URL || 'https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com' }}" | ||||||||||||
| RELEASE_TAG: '${{ needs.prepare.outputs.release_tag }}' | ||||||||||||
| run: |- | ||||||||||||
| set -euo pipefail | ||||||||||||
|
|
||||||||||||
| npm run verify:installation-release -- --base-url "${ALIYUN_OSS_PUBLIC_BASE_URL}/releases/qwen-code/${RELEASE_TAG}" | ||||||||||||
|
|
||||||||||||
| - name: 'Sync Hosted Installation Assets to Aliyun OSS' | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] 每个稳定版本无条件覆盖全局非版本化 建议:不要在 release workflow 中自动上传到全局 — DeepSeek/deepseek-v4-pro via Qwen Code /review
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] "Sync Hosted Installation Assets" uploads to both
Suggested change
— DeepSeek/deepseek-v4-pro via Qwen Code /review |
||||||||||||
| if: |- | ||||||||||||
| ${{ needs.prepare.outputs.is_dry_run == 'false' && needs.prepare.outputs.is_nightly == 'false' && needs.prepare.outputs.is_preview == 'false' }} | ||||||||||||
| env: | ||||||||||||
| ALIYUN_OSS_BUCKET: "${{ vars.ALIYUN_OSS_BUCKET || 'qwen-code-assets' }}" | ||||||||||||
| RELEASE_TAG: '${{ needs.prepare.outputs.release_tag }}' | ||||||||||||
| run: |- | ||||||||||||
| set -euo pipefail | ||||||||||||
|
|
||||||||||||
| hosted_assets=( | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] This hardcoded Consider deriving the upload list from the build output (e.g., — qwen-latest-series-invite-beta-v34 via Qwen Code /review
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] If this second upload (global Fix: reorder the — qwen-latest-series-invite-beta-v34 via Qwen Code /review |
||||||||||||
| dist/installation/install-qwen-standalone.sh | ||||||||||||
| dist/installation/install-qwen-standalone.ps1 | ||||||||||||
| dist/installation/install-qwen-standalone.bat | ||||||||||||
| dist/installation/uninstall-qwen-standalone.sh | ||||||||||||
| dist/installation/uninstall-qwen-standalone.ps1 | ||||||||||||
| dist/installation/SHA256SUMS | ||||||||||||
| ) | ||||||||||||
| node scripts/upload-aliyun-oss-assets.js \ | ||||||||||||
| --bucket "${ALIYUN_OSS_BUCKET}" \ | ||||||||||||
| --config "${RUNNER_TEMP}/.ossutilconfig" \ | ||||||||||||
| --prefix "installation/${RELEASE_TAG}" \ | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] 「Sync Hosted Installation Assets」步骤先将资产上传到全局 — DeepSeek/deepseek-v4-pro via Qwen Code /review |
||||||||||||
| "${hosted_assets[@]}" | ||||||||||||
| node scripts/upload-aliyun-oss-assets.js \ | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] This Route through — qwen-latest-series-invite-beta-v34 via Qwen Code /review
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] If this second upload (global Fix: reorder the — qwen-latest-series-invite-beta-v34 via Qwen Code /review |
||||||||||||
| --bucket "${ALIYUN_OSS_BUCKET}" \ | ||||||||||||
| --config "${RUNNER_TEMP}/.ossutilconfig" \ | ||||||||||||
| --prefix "installation" \ | ||||||||||||
| "${hosted_assets[@]}" | ||||||||||||
|
|
||||||||||||
| - name: 'Verify Aliyun OSS Hosted Installation Assets' | ||||||||||||
| if: |- | ||||||||||||
| ${{ needs.prepare.outputs.is_dry_run == 'false' && needs.prepare.outputs.is_nightly == 'false' && needs.prepare.outputs.is_preview == 'false' }} | ||||||||||||
| env: | ||||||||||||
| ALIYUN_OSS_PUBLIC_BASE_URL: "${{ vars.ALIYUN_OSS_PUBLIC_BASE_URL || 'https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com' }}" | ||||||||||||
| RELEASE_TAG: '${{ needs.prepare.outputs.release_tag }}' | ||||||||||||
| run: |- | ||||||||||||
| set -euo pipefail | ||||||||||||
|
|
||||||||||||
| hosted_tmp_dir="$(mktemp -d)" | ||||||||||||
| trap 'rm -rf "${hosted_tmp_dir}"' EXIT | ||||||||||||
| mkdir -p "${hosted_tmp_dir}/versioned" "${hosted_tmp_dir}/global" | ||||||||||||
| for asset in install-qwen-standalone.sh install-qwen-standalone.ps1 install-qwen-standalone.bat uninstall-qwen-standalone.sh uninstall-qwen-standalone.ps1 SHA256SUMS; do | ||||||||||||
| url="${ALIYUN_OSS_PUBLIC_BASE_URL}/installation/${RELEASE_TAG}/${asset}" | ||||||||||||
| global_url="${ALIYUN_OSS_PUBLIC_BASE_URL}/installation/${asset}" | ||||||||||||
| curl -fsSL --connect-timeout 15 --max-time 300 "${url}" -o "${hosted_tmp_dir}/versioned/${asset}" | ||||||||||||
| curl -fsSL --connect-timeout 15 --max-time 300 "${global_url}" -o "${hosted_tmp_dir}/global/${asset}" | ||||||||||||
| done | ||||||||||||
| cmp -s "dist/installation/SHA256SUMS" "${hosted_tmp_dir}/versioned/SHA256SUMS" || { | ||||||||||||
| echo "::error::Hosted installation SHA256SUMS does not match local dist/installation/SHA256SUMS" | ||||||||||||
| diff -u "dist/installation/SHA256SUMS" "${hosted_tmp_dir}/versioned/SHA256SUMS" || true | ||||||||||||
| exit 1 | ||||||||||||
| } | ||||||||||||
| cmp -s "dist/installation/SHA256SUMS" "${hosted_tmp_dir}/global/SHA256SUMS" || { | ||||||||||||
| echo "::error::Global hosted installation SHA256SUMS does not match local dist/installation/SHA256SUMS" | ||||||||||||
| diff -u "dist/installation/SHA256SUMS" "${hosted_tmp_dir}/global/SHA256SUMS" || true | ||||||||||||
| exit 1 | ||||||||||||
| } | ||||||||||||
| (cd "${hosted_tmp_dir}/versioned" && sha256sum -c SHA256SUMS) | ||||||||||||
| (cd "${hosted_tmp_dir}/global" && sha256sum -c SHA256SUMS) | ||||||||||||
|
|
||||||||||||
| - name: 'Publish Aliyun OSS Latest VERSION' | ||||||||||||
| # Run last so the `latest/VERSION` pointer only flips after every | ||||||||||||
| # release asset and hosted installer object has been uploaded and | ||||||||||||
| # verified. If any earlier step fails, the pointer keeps referring | ||||||||||||
| # to the previously-good release. | ||||||||||||
| if: |- | ||||||||||||
| ${{ needs.prepare.outputs.is_dry_run == 'false' && needs.prepare.outputs.is_nightly == 'false' && needs.prepare.outputs.is_preview == 'false' }} | ||||||||||||
| env: | ||||||||||||
| ALIYUN_OSS_BUCKET: "${{ vars.ALIYUN_OSS_BUCKET || 'qwen-code-assets' }}" | ||||||||||||
| ALIYUN_OSS_PUBLIC_BASE_URL: "${{ vars.ALIYUN_OSS_PUBLIC_BASE_URL || 'https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com' }}" | ||||||||||||
| RELEASE_TAG: '${{ needs.prepare.outputs.release_tag }}' | ||||||||||||
| run: |- | ||||||||||||
| set -euo pipefail | ||||||||||||
|
|
||||||||||||
| printf '%s\n' "${RELEASE_TAG}" > "${RUNNER_TEMP}/qwen-code-latest-version" | ||||||||||||
| ossutil cp "${RUNNER_TEMP}/qwen-code-latest-version" "oss://${ALIYUN_OSS_BUCKET}/releases/qwen-code/latest/VERSION" -c "${RUNNER_TEMP}/.ossutilconfig" -f --acl public-read | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] If this second upload (global Fix: reorder the — qwen-latest-series-invite-beta-v34 via Qwen Code /review
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] This Route through — qwen-latest-series-invite-beta-v34 via Qwen Code /review |
||||||||||||
|
|
||||||||||||
| latest_version="$(curl -fsSL --connect-timeout 15 --max-time 300 "${ALIYUN_OSS_PUBLIC_BASE_URL}/releases/qwen-code/latest/VERSION" | tr -d '[:space:]')" | ||||||||||||
| if [[ "${latest_version}" != "${RELEASE_TAG}" ]]; then | ||||||||||||
| echo "::error::Aliyun latest VERSION points to ${latest_version}, expected ${RELEASE_TAG}" | ||||||||||||
| exit 1 | ||||||||||||
| fi | ||||||||||||
|
|
||||||||||||
| - name: 'Cleanup Aliyun OSS Credentials' | ||||||||||||
| if: |- | ||||||||||||
| ${{ always() && needs.prepare.outputs.is_dry_run == 'false' }} | ||||||||||||
| run: |- | ||||||||||||
| rm -f "${RUNNER_TEMP}/.ossutilconfig" | ||||||||||||
|
|
||||||||||||
| - name: 'Create PR to merge release branch into main' | ||||||||||||
| if: |- | ||||||||||||
| ${{ needs.prepare.outputs.is_dry_run == 'false' && needs.prepare.outputs.is_nightly == 'false' && needs.prepare.outputs.is_preview == 'false' }} | ||||||||||||
|
|
||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion]
ossutil configwrites Aliyun credentials in plaintext to${RUNNER_TEMP}/.ossutilconfigvia-iand-k. The cleanuprm -fruns onalways(), but if the runner is killed (OOM, timeout), credentials remain on disk.— DeepSeek/deepseek-v4-pro via Qwen Code /review