Skip to content

Commit 30fe453

Browse files
committed
ci(build): skip already-published registry versions on release re-runs
1 parent 1f2242c commit 30fe453

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,17 @@ jobs:
167167
168168
# Use pre-built VSIX for publishing: pnpm package (scripts/package.sh)
169169
# dereferences pnpm symlinks that vsce can't follow.
170+
# skipDuplicate makes a release-tag re-run idempotent: a registry that
171+
# already carries this version is skipped instead of failing the job, so
172+
# a partial release (e.g. one registry's token expired) can be completed
173+
# by re-running the tag without tripping over the registries that succeeded.
170174
- name: Publish to Open VSX Registry
171175
if: "startsWith(github.ref, 'refs/tags/')"
172176
uses: HaaLeo/publish-vscode-extension@ca5561daa085dee804bf9f37fe0165785a9b14db # v2
173177
with:
174178
pat: ${{ secrets.OPEN_VSX_TOKEN }}
175179
extensionFile: ${{ env.VSIX_PATH }}
180+
skipDuplicate: true
176181

177182
- name: Publish to Visual Studio Marketplace
178183
if: "startsWith(github.ref, 'refs/tags/')"
@@ -181,6 +186,7 @@ jobs:
181186
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
182187
registryUrl: https://marketplace.visualstudio.com
183188
extensionFile: ${{ env.VSIX_PATH }}
189+
skipDuplicate: true
184190

185191
# @bgforge/mls-server declares a runtime dependency on @bgforge/format
186192
# (workspace:*, substituted with format's concrete version on publish). The

zizmor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ rules:
1212
# provenance attestation against the trusted builder's published tag, so a
1313
# SHA pin would make the resulting attestation unverifiable. Documented
1414
# in-line at the `uses:` line itself (build.yml, provenance job).
15-
- build.yml:216
15+
- build.yml:222
1616
cache-poisoning:
1717
ignore:
1818
# actions/setup-node's `cache: pnpm` restores the pnpm store from the

0 commit comments

Comments
 (0)