Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

cd-cua-spaces: a stable release is published as not-prerelease (#6347)

cua-agents[bot]01a91d7b9698
diff --git a/.github/scripts/tests/test_cua_spaces_release_wiring.py b/.github/scripts/tests/test_cua_spaces_release_wiring.py
index 52567095be..de26d45c67 100644
--- a/.github/scripts/tests/test_cua_spaces_release_wiring.py
+++ b/.github/scripts/tests/test_cua_spaces_release_wiring.py
@@ -132,3 +132,11 @@ class TestCuaSpacesReleaseWiring(unittest.TestCase):
if __name__ == "__main__":
unittest.main()
+
+
+def test_publish_step_clears_prerelease_on_stable_release():
+ # The Electron job can create the draft first; a stable release must not stay a prerelease,
+ # or the cua.ai /download page and the DMG redirect skip it (0.19.4, 3 Nov 2026).
+ workflow = (Path(__file__).resolve().parents[2] / "workflows" / "cd-cua-spaces.yml").read_text()
+ assert "flags+=(--prerelease=false)" in workflow
+ assert "--draft --prerelease --verify-tag" not in workflow
diff --git a/.github/workflows/cd-cua-spaces.yml b/.github/workflows/cd-cua-spaces.yml
index 0d83e40dd4..71a0975085 100644
--- a/.github/workflows/cd-cua-spaces.yml
+++ b/.github/workflows/cd-cua-spaces.yml
@@ -1843,13 +1843,15 @@ jobs:
MAC: ${{ needs.electron-mac.result }}
WINDOWS: ${{ needs.electron-plan.outputs.windows }}
LINUX: ${{ needs.electron-plan.outputs.linux }}
+ PRERELEASE: ${{ needs.electron-plan.outputs.prerelease }}
run: |
set -euo pipefail
tag="cua-spaces-v${VERSION}"
# build-macos normally made the draft; a hand-pushed tag may race it.
if ! gh release view "$tag" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
.github/scripts/spaces_release_notes.sh "$VERSION" > "$RUNNER_TEMP/release-notes.md"
- gh release create "$tag" --repo "$GITHUB_REPOSITORY" --draft --prerelease --verify-tag \
+ pre=(); [ "$PRERELEASE" = true ] && pre=(--prerelease)
+ gh release create "$tag" --repo "$GITHUB_REPOSITORY" --draft ${pre[@]+"${pre[@]}"} --verify-tag \
--title "Cua Spaces v${VERSION}" --notes-file "$RUNNER_TEMP/release-notes.md" \
|| gh release view "$tag" --repo "$GITHUB_REPOSITORY" >/dev/null
fi
@@ -2237,7 +2239,13 @@ jobs:
set -euo pipefail
flags=(--draft=false)
# Staging builds and X.Y.Z-suffix versions are prereleases, never latest.
- [ "$PRERELEASE" = true ] && flags+=(--prerelease --latest=false)
+ # A stable release must not stay a prerelease: the Electron job can create the
+ # draft first (as a prerelease), and the site and installers skip prereleases.
+ if [ "$PRERELEASE" = true ]; then
+ flags+=(--prerelease --latest=false)
+ else
+ flags+=(--prerelease=false)
+ fi
if [ "$GITHUB_REPOSITORY" != trycua/cua ] || grep -q UNSIGNED signing/*.txt; then
label="staging"; [ "$GITHUB_REPOSITORY" = trycua/cua ] && label="test"
# Name the unsigned platforms: "UNSIGNED: windows-x64".