Skip to content

Commit 07d9967

Browse files
authored
W-21616134: trigger CBW release after publishing extensions to marketplace (#7011)
* feat: trigger CBW release after publishing extensions to marketplace Add trigger-cbw-release job to publishVSCode.yml that fires a repository_dispatch event to forcedotcom/code-builder-web after extensions are successfully published. Fire-and-forget — does not block CTC close. * fix: make CBW dispatch non-blocking so publish failures don't fail the workflow * feat: add CBW_TRIGGER_ENABLED to toggle promote-on-publish dispatch - Add repo variable check (default enabled, set false to disable) - Document in contributing/publishing.md
1 parent 8b22a06 commit 07d9967

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/publishVSCode.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,24 @@ jobs:
8383
with:
8484
changeCaseId: ${{ needs.ctc-open.outputs.changeCaseId }}
8585
status: Not Implemented
86+
87+
# Set repo variable CBW_TRIGGER_ENABLED=false to disable dispatch to code-builder-web.
88+
# Default (unset): dispatch after publish. Use when publishing without CBW promotion.
89+
trigger-cbw-release:
90+
needs: [publish, prepare-environment-from-main]
91+
if: needs.publish.result == 'success' && vars.CBW_TRIGGER_ENABLED != 'false'
92+
continue-on-error: true
93+
runs-on: ubuntu-latest
94+
steps:
95+
- name: Trigger Code Builder Web release
96+
env:
97+
GH_TOKEN: ${{ secrets.IDEE_GH_TOKEN }}
98+
run: |
99+
VERSION="${{ needs.prepare-environment-from-main.outputs.RELEASE_VERSION }}"
100+
echo "Dispatching extension-publish event to code-builder-web with version $VERSION"
101+
gh api repos/forcedotcom/code-builder-web/dispatches \
102+
--method POST \
103+
-f event_type=extension-publish \
104+
-f "client_payload[version]=$VERSION" \
105+
-f "client_payload[source]=publishVSCode"
106+
echo "Dispatch sent successfully"

contributing/publishing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ find ~/Downloads/v64.8.0 -type f -name "*.vsix" -exec code --install-extension {
8080

8181
After completing your release testing following our internal template, approve the publish job "Publish in Microsoft Marketplace" and "Publish in Open VSX Registry" to allow the extensions to be uploaded and complete the release process.
8282

83+
**Code Builder Web promotion:** After publishing to the MS Marketplace, the workflow dispatches to `code-builder-web` to trigger a CBW release and auto-promote to production. Set repo variable `CBW_TRIGGER_ENABLED=false` (Settings → Secrets and variables → Actions → Variables) to publish without triggering CBW. Default (unset) enables the trigger.
84+
8385
## Troubleshooting
8486

8587
- 401 errors on publish? You probably need to update the VSCE PAT. https://salesforce.quip.com/E8GWA5TuI8jp

0 commit comments

Comments
 (0)