Skip to content

Commit 12318ae

Browse files
author
yanan.zhangyn
committed
fix(studio): scope thin releases by provider
1 parent 59d7ae4 commit 12318ae

2 files changed

Lines changed: 46 additions & 2 deletions

File tree

.github/workflows/publish-studio-release.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
required: true
2323
type: string
2424
thin_bundles:
25-
description: Publish provider-local thin bundles (requires server opt-in)
25+
description: Publish Volcengine thin bundles (BytePlus remains full-only)
2626
required: true
2727
default: false
2828
type: boolean
@@ -246,9 +246,11 @@ jobs:
246246
matrix:
247247
include:
248248
- provider: volcengine
249+
thin_bundles: ${{ inputs.thin_bundles }}
249250
url_secret: STUDIO_RELEASE_SERVER_URL
250251
key_secret: STUDIO_RELEASE_SERVER_API_KEY
251252
- provider: byteplus
253+
thin_bundles: false
252254
url_secret: BYTEPLUS_STUDIO_RELEASE_SERVER_URL
253255
key_secret: BYTEPLUS_STUDIO_RELEASE_SERVER_API_KEY
254256
runs-on: ubuntu-latest
@@ -259,7 +261,7 @@ jobs:
259261
RELEASE_SERVER_URL: ${{ secrets[matrix.url_secret] }}
260262
RELEASE_SERVER_API_KEY: ${{ secrets[matrix.key_secret] }}
261263
RELEASE_VERSION: ${{ needs.release-context.outputs.version }}
262-
RELEASE_THIN_BUNDLES: ${{ inputs.thin_bundles }}
264+
RELEASE_THIN_BUNDLES: ${{ matrix.thin_bundles }}
263265

264266
steps:
265267
- name: Validate release server configuration
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""Regression tests for the Studio release workflow."""
16+
17+
from pathlib import Path
18+
from typing import Any
19+
20+
import yaml
21+
22+
23+
def _publish_job() -> dict[str, Any]:
24+
workflow_path = (
25+
Path(__file__).parents[1]
26+
/ ".github"
27+
/ "workflows"
28+
/ "publish-studio-release.yaml"
29+
)
30+
workflow = yaml.safe_load(workflow_path.read_text(encoding="utf-8"))
31+
return workflow["jobs"]["publish"]
32+
33+
34+
def test_thin_bundle_input_is_scoped_to_supported_provider() -> None:
35+
publish = _publish_job()
36+
providers = {
37+
entry["provider"]: entry for entry in publish["strategy"]["matrix"]["include"]
38+
}
39+
40+
assert providers["volcengine"]["thin_bundles"] == "${{ inputs.thin_bundles }}"
41+
assert providers["byteplus"]["thin_bundles"] is False
42+
assert publish["env"]["RELEASE_THIN_BUNDLES"] == "${{ matrix.thin_bundles }}"

0 commit comments

Comments
 (0)