From c490a3ee6054c7d9e388e6937920747e4069b619 Mon Sep 17 00:00:00 2001 From: Arnaud Lheureux Date: Wed, 27 May 2026 09:51:29 +0800 Subject: [PATCH] fix(release): always publish stable to VS Code Marketplace Drop the odd-minor / even-minor convention from the marketplace publish step. It was triggering 'Cannot use --pre-release flag with a package that was not packaged as pre-release' on v0.1.0 because the VSIX is always packaged without --pre-release. The odd/even minor scheme is an opt-in convention used by some Microsoft extensions, not a marketplace requirement. We publish every release as a stable marketplace release; semver pre-release suffixes (e.g. 0.1.0-rc.1) continue to skip marketplace publish entirely. --- .github/workflows/git-ape-release.yml | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/git-ape-release.yml b/.github/workflows/git-ape-release.yml index d1d0f77..bd3916f 100644 --- a/.github/workflows/git-ape-release.yml +++ b/.github/workflows/git-ape-release.yml @@ -308,28 +308,19 @@ jobs: fi # VS Code Marketplace rejects semver pre-release suffixes - # (e.g. 0.1.0-rc.1). The official channel model uses odd minors - # for the Pre-Release channel and even minors for Release. - # See: https://code.visualstudio.com/api/working-with-extensions/publishing-extension#prerelease-extensions + # (e.g. 0.1.0-rc.1). We publish every release as a stable + # marketplace release regardless of minor parity — the odd/even + # minor convention is opt-in and would require packaging the VSIX + # with --pre-release to match, which we don't do here. if [[ "$VERSION" == *-* ]]; then echo "Version $VERSION carries a semver pre-release suffix, which the" echo "VS Code Marketplace does not accept. Skipping marketplace publish." exit 0 fi - MINOR=$(echo "$VERSION" | cut -d. -f2) - if (( MINOR % 2 == 1 )); then - FLAG="--pre-release" - CHANNEL="Pre-Release" - else - FLAG="" - CHANNEL="Release" - fi - VSIX_FILE=$(ls ./*.vsix) - echo "Publishing $VSIX_FILE to VS Code Marketplace ($CHANNEL channel)" - # shellcheck disable=SC2086 - vsce publish --packagePath "$VSIX_FILE" --no-dependencies $FLAG + echo "Publishing $VSIX_FILE to VS Code Marketplace (Release channel)" + vsce publish --packagePath "$VSIX_FILE" --no-dependencies - name: Update CHANGELOG.md on main if: steps.ver.outputs.prerelease == 'false'