Skip to content

feat(nightly-publish): publish Open VSX pre-releases, skip on release merge#790

Merged
edelauna merged 1 commit into
mainfrom
issue/784
Jul 4, 2026
Merged

feat(nightly-publish): publish Open VSX pre-releases, skip on release merge#790
edelauna merged 1 commit into
mainfrom
issue/784

Conversation

@edelauna

@edelauna edelauna commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Related GitHub Issue

Closes: #784

Description

Publishes nightly pre-release builds to Open VSX in addition to the VS Code Marketplace, and adds a guard so the release-PR merge back into main doesn't also trigger a redundant nightly pre-release.

Open VSX pre-release publishing

The workflow previously skipped Open VSX for nightlies, with a comment claiming Open VSX has no pre-release concept. That was incorrect — verified against the Open VSX server source (ExtensionVersionJooqRepository.findLatestQuery, eclipse-openvsx/openvsx) and confirmed live against the real ZooCodeOrganization.zoo-code listing:

  • The pre-release alias correctly isolates pre-release-flagged versions.
  • The latest alias resolves to the highest semver across stable and pre-release, using the pre-release flag only as a tie-breaker at identical major.minor.patch. A nightly build can therefore transiently become latest until the next stable release outranks it — the same trade-off already accepted for Marketplace pre-release publishing, since both track "newest published version."

The Open VSX publish step intentionally omits ovsx publish --pre-release: for an already-packaged .vsix (built earlier in the job via vsce package --pre-release), ovsx ignores that flag and warns that it's a no-op — the pre-release marker is already baked into the VSIX's Microsoft.VisualStudio.Code.PreRelease manifest property, which is what Open VSX actually reads.

Skip on release merge

The release runbook (.roo/commands/release.md) squash-merges release PRs into main with the commit message chore: prepare v[version] release, after the tag has already been pushed and stable has already shipped. Without a guard, that merge would also trigger a nightly pre-release publish of code that was just released as stable. Added a "Skip if this push is a release merge" step that checks:

  1. The commit subject against the release-prep message pattern, and
  2. Whether a GitHub release already exists for the current src/package.json version (belt-and-suspenders if the message convention ever drifts).

gh release view failures are distinguished by message: "release not found" is the expected non-match; anything else (auth/API failure) fails the step loudly instead of silently falling through to a publish.

Duplicate-publish logging

The Open VSX publish step now checks ovsx's output for "is already published" and logs that the version was skipped rather than unconditionally claiming a fresh publish — --skip-duplicate returns success without actually publishing in that case.

Test Procedure

  • Manually built a pre-release VSIX with vsce package --pre-release and confirmed the Microsoft.VisualStudio.Code.PreRelease manifest property is set.
  • Published a real test pre-release to the ZooCodeOrganization.zoo-code Open VSX listing and confirmed via the registry API that the pre-release alias correctly isolated it while latest tracked highest-semver as expected.
  • Verified the release-merge skip regex against real historical release commits (chore: prepare v3.64.0 release (#729), chore: prepare v3.62.0 release (#658)) and against a normal feature commit, confirming correct match/no-match in both directions.
  • Verified gh release view error handling against three cases: version not found, version found (existing stable release v3.64.0), and an invalid token (401) — confirmed each takes the correct branch.
  • Verified the duplicate-skip log message against both a real ovsx "already published" response and a real publish-success response.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Documentation Updates

  • No documentation updates are required.

Additional Notes

This is a CI/workflow-only change (.github/workflows/nightly-publish.yml); there's no application code path to unit test. Verification was done by exercising the actual ovsx/gh commands and shell logic locally against the real registry and repo, as detailed in the Test Procedure above.

Summary by CodeRabbit

  • Bug Fixes
    • Nightly pre-releases now automatically skip build and publishing when the latest commit appears to be a release-prep merge or when the version already exists as a stable release.
    • Improved handling of duplicate publish attempts to reduce unnecessary errors.
  • New Features
    • Added nightly pre-release publishing to the Open VSX Registry.
    • Made VS Code Marketplace pre-release publishing conditional to prevent redundant uploads.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f5ede88e-e38d-4e3c-a8d6-d47653c831f7

📥 Commits

Reviewing files that changed from the base of the PR and between c95caea and 751f07b.

📒 Files selected for processing (1)
  • .github/workflows/nightly-publish.yml

📝 Walkthrough

Walkthrough

The nightly publish workflow now computes a skip flag before pre-release versioning, build, verification, and publishing. It also adds Open VSX pre-release publishing and handles already-published output distinctly.

Changes

Nightly pre-release workflow

Layer / File(s) Summary
Release-skip detection and build gating
.github/workflows/nightly-publish.yml
Adds skip detection from the latest commit subject and stable release presence, then gates pre-release versioning, build, VSIX verification, and manifest validation on skip != 'true'.
Marketplace and Open VSX publish steps
.github/workflows/nightly-publish.yml
Makes Marketplace pre-release publishing conditional on the skip flag and adds an Open VSX publish step that uses ovsx publish, pipefail, and duplicate-publish detection.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Workflow as GitHub Actions Workflow
  participant GH as GitHub Releases API
  participant Marketplace as VS Code Marketplace
  participant OpenVSX as Open VSX Registry

  Workflow->>GH: gh release view (check existing stable release)
  GH-->>Workflow: release status
  Workflow->>Workflow: compute skip flag
  alt skip != true
    Workflow->>Workflow: set pre-release version
    Workflow->>Workflow: build and verify VSIX
    Workflow->>Marketplace: vsce publish --pre-release
    Workflow->>OpenVSX: ovsx publish --pre-release
    OpenVSX-->>Workflow: publish output (already published or success)
  else skip == true
    Workflow->>Workflow: skip build and publish steps
  end
Loading

Related issues: #784

Suggested labels: ci, workflow, publishing

Suggested reviewers: none

Poem
Nightly checks the release list twice,
Skips the run when the version’s nice,
Marketplace and Open VSX align,
Pre-releases flow on the same line.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main workflow change: Open VSX pre-release publishing with a release-merge skip guard.
Description check ✅ Passed The PR includes the required issue link, summary, test procedure, checklist, and documentation notes; only optional sections are omitted.
Linked Issues check ✅ Passed The workflow adds Open VSX pre-release publishing for the same VSIX and a guard against redundant release-merge runs, matching #784's intent.
Out of Scope Changes check ✅ Passed The added skip logic and duplicate-publish logging stay within the publish-workflow scope and don't introduce unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue/784

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@edelauna edelauna changed the title feat(nightly-publish): adding ovsx pre-release step feat(nightly-publish): publish Open VSX pre-releases, skip on release merge Jul 3, 2026
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@edelauna edelauna marked this pull request as ready for review July 3, 2026 23:16

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/nightly-publish.yml:
- Around line 44-67: The nightly publish step in the release-check shell block
is matching gh release view’s missing-release error too exactly, which makes the
normal “not found” path brittle. Update the logic around the gh release view
call in the workflow script to treat the missing-release case with a substring
check instead of an exact string comparison, while still failing fast on any
other unexpected error and preserving the existing skip output behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cc8d52f9-9f30-412a-8735-ccd383c09190

📥 Commits

Reviewing files that changed from the base of the PR and between 1c728e7 and e6d51d8.

📒 Files selected for processing (1)
  • .github/workflows/nightly-publish.yml

Comment thread .github/workflows/nightly-publish.yml
@github-actions github-actions Bot added the awaiting-review PR changes are ready and waiting for maintainer re-review label Jul 3, 2026
@github-actions github-actions Bot removed the awaiting-review PR changes are ready and waiting for maintainer re-review label Jul 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/nightly-publish.yml:
- Around line 131-158: The Marketplace publish step in the nightly publish
workflow is not idempotent, so reruns can fail on an already-published version
before reaching the Open VSX step. Update the `Publish pre-release to VS Code
Marketplace` job in the workflow to pass `--skip-duplicate` to the `npx
`@vscode/vsce` publish` command, keeping the existing `steps.release-check` guard
and `VSCE_PAT`/`VERSION_NUMBER` usage unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 419c61b6-0af0-47e4-ade9-b7c6b645c99a

📥 Commits

Reviewing files that changed from the base of the PR and between e6d51d8 and c95caea.

📒 Files selected for processing (1)
  • .github/workflows/nightly-publish.yml

Comment thread .github/workflows/nightly-publish.yml
@github-actions github-actions Bot added the awaiting-review PR changes are ready and waiting for maintainer re-review label Jul 4, 2026
@edelauna edelauna added this pull request to the merge queue Jul 4, 2026
Merged via the queue into main with commit 21a15e5 Jul 4, 2026
14 checks passed
@edelauna edelauna deleted the issue/784 branch July 4, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR changes are ready and waiting for maintainer re-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(publish): add Open VSX pre-release publishing step

2 participants