11name : Promote Nightly to Pre-release
22
3- # Publishes a nightly build to pre-release on VS Code Marketplace and Open VSX.
3+ # Publishes a nightly build to pre-release on the VS Code Marketplace. Open VSX is NOT published
4+ # from here. See "Open VSX Trusted Publishing" in this repo's README for why, and use this
5+ # workflow's `release-tag` output to dispatch your own Open VSX publish afterward.
46#
57# NOTE: Callers should use vscode-find-nightly-candidate.yml and check-ci-status action
68# BEFORE calling this workflow to implement their own gate-check logic.
@@ -36,9 +38,9 @@ name: Promote Nightly to Pre-release
3638# Requirements - calling repository must have:
3739# - Nightly tags matching *-nightly.* (e.g., v1.2.3-nightly.20260629)
3840# - GitHub releases for each nightly tag with VSIX file(s) attached
39- # - Secrets: IDEE_GH_TOKEN, VSCE_PERSONAL_ACCESS_TOKEN, IDEE_OVSX_PAT
41+ # - Secrets: IDEE_GH_TOKEN, VSCE_PERSONAL_ACCESS_TOKEN
4042#
41- # Workflow: downloads VSIX → publishes to both marketplaces → creates tracking tag
43+ # Workflow: downloads VSIX → publishes to VS Code Marketplace → creates tracking tag
4244
4345on :
4446 workflow_call :
@@ -120,14 +122,6 @@ permissions:
120122jobs :
121123 publish :
122124 runs-on : ubuntu-latest
123- strategy :
124- fail-fast : false
125- matrix :
126- include :
127- - registry : vsce
128- publish-tool : vsce
129- - registry : ovsx
130- publish-tool : ovsx
131125 steps :
132126 - name : Checkout
133127 uses : actions/checkout@v6
@@ -151,15 +145,13 @@ jobs:
151145 --dir ./vsix-artifacts \
152146 --repo "${{ github.repository }}"
153147
154- - name : Publish to ${{ matrix.registry }}
148+ - name : Publish to Visual Studio Marketplace
155149 env :
156150 NIGHTLY_TAG : ${{ inputs.release-tag }}
157151 VSIX_PATTERN : ${{ inputs.vsix-name-pattern || '*.vsix' }}
158152 EXCLUDE_WEB : ${{ inputs.exclude-web-vsix || 'false' }}
159- PUBLISH_TOOL : ${{ matrix.publish-tool }}
160153 DRY_RUN : ${{ inputs.dry-run || 'false' }}
161154 VSCE_PERSONAL_ACCESS_TOKEN : ${{ secrets.VSCE_PERSONAL_ACCESS_TOKEN }}
162- OVSX_PAT : ${{ secrets.IDEE_OVSX_PAT }}
163155 run : |
164156 set -uo pipefail
165157
@@ -177,20 +169,13 @@ jobs:
177169 exit 1
178170 fi
179171
180- if [ "$PUBLISH_TOOL" = "ovsx" ]; then
181- MARKETPLACE_NAME="Open VSX Registry"
182- TOKEN="$OVSX_PAT"
183- else
184- MARKETPLACE_NAME="Visual Studio Marketplace"
185- TOKEN="$VSCE_PERSONAL_ACCESS_TOKEN"
186- fi
187-
172+ TOKEN="$VSCE_PERSONAL_ACCESS_TOKEN"
188173 if [ "$DRY_RUN" != "true" ] && [ -z "$TOKEN" ]; then
189- echo "::error::Token for $PUBLISH_TOOL is not set"
174+ echo "::error::Token for vsce is not set"
190175 exit 1
191176 fi
192177
193- echo "Publishing ${#VSIX_FILES[@]} VSIX(s) as pre-release to $MARKETPLACE_NAME :"
178+ echo "Publishing ${#VSIX_FILES[@]} VSIX(s) as pre-release to Visual Studio Marketplace :"
194179 printf ' %s\n' "${VSIX_FILES[@]}"
195180
196181 RUN_ID="${{ github.run_id }}"
@@ -199,7 +184,7 @@ jobs:
199184 FAILED=0
200185
201186 # Marketplace gallery requests can sit until typed-rest-client's 180s
202- # socket timeout. vsce/ovsx have no timeout flag; retry per VSIX.
187+ # socket timeout. vsce has no timeout flag; retry per VSIX.
203188 # --skip-duplicate makes a retry a no-op if the first attempt committed.
204189 publish_with_retry() {
205190 local attempt
@@ -218,41 +203,32 @@ jobs:
218203
219204 for VSIX in "${VSIX_FILES[@]}"; do
220205 NAME=$(basename "$VSIX")
221- echo "::group::$NAME → $MARKETPLACE_NAME "
206+ echo "::group::$NAME → Visual Studio Marketplace "
222207
223208 # Audit trail (mirrors the publish-vsix action's per-file record)
224209 HASH=$(sha256sum "$VSIX" 2>/dev/null | cut -d' ' -f1 || echo "unknown")
225- echo "[AUDIT] actor=$ACTOR repo=$REPO run_id=$RUN_ID tool=$PUBLISH_TOOL file=$NAME hash=$HASH pre_release=true dry_run=$DRY_RUN"
210+ echo "[AUDIT] actor=$ACTOR repo=$REPO run_id=$RUN_ID tool=vsce file=$NAME hash=$HASH pre_release=true dry_run=$DRY_RUN"
226211
227212 if [ "$DRY_RUN" = "true" ]; then
228213 echo "🔍 DRY RUN - would publish $NAME (pre-release)"
229214 echo "::endgroup::"
230215 continue
231216 fi
232217
233- if [ "$PUBLISH_TOOL" = "vsce" ]; then
234- if VSCE_PAT="$TOKEN" publish_with_retry npx @vscode/vsce publish --packagePath "$VSIX" --skip-duplicate --pre-release; then
235- echo "✅ Published $NAME to $MARKETPLACE_NAME"
236- else
237- echo "::error::Failed to publish $NAME to $MARKETPLACE_NAME"
238- FAILED=1
239- fi
218+ if VSCE_PAT="$TOKEN" publish_with_retry npx @vscode/vsce publish --packagePath "$VSIX" --skip-duplicate --pre-release; then
219+ echo "✅ Published $NAME to Visual Studio Marketplace"
240220 else
241- if publish_with_retry npx ovsx publish "$VSIX" -p "$TOKEN" --skip-duplicate --pre-release; then
242- echo "✅ Published $NAME to $MARKETPLACE_NAME"
243- else
244- echo "::error::Failed to publish $NAME to $MARKETPLACE_NAME"
245- FAILED=1
246- fi
221+ echo "::error::Failed to publish $NAME to Visual Studio Marketplace"
222+ FAILED=1
247223 fi
248224 echo "::endgroup::"
249225 done
250226
251227 if [ "$FAILED" -ne 0 ]; then
252- echo "::error::One or more VSIX publishes failed for $PUBLISH_TOOL "
228+ echo "::error::One or more VSIX publishes failed for vsce "
253229 exit 1
254230 fi
255- echo "✅ All ${#VSIX_FILES[@]} VSIX(s) processed for $MARKETPLACE_NAME "
231+ echo "✅ All ${#VSIX_FILES[@]} VSIX(s) processed for Visual Studio Marketplace "
256232
257233 tag-promoted :
258234 needs : publish
0 commit comments