From d8d034ca9e46638cc366838ca702841c95150719 Mon Sep 17 00:00:00 2001 From: Victor Martin Date: Thu, 18 Jun 2026 12:42:33 +0200 Subject: [PATCH] fix(release): fail publish workflow on registry errors --- .github/workflows/release.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de9ad64..5acce79 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,11 +40,16 @@ jobs: run: pnpm build - name: Publish to npm - continue-on-error: true run: pnpm publish --access public --no-git-checks env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Verify npm publish + run: | + PACKAGE_VERSION="$(node -p "require('./package.json').version")" + PUBLISHED_VERSION="$(npm view "@corbat-tech/coco@${PACKAGE_VERSION}" version)" + test "$PUBLISHED_VERSION" = "$PACKAGE_VERSION" + # ── 2. VS Code Marketplace ─────────────────────────────────────────────────── release-vscode: name: Publish VS Code Extension @@ -78,7 +83,6 @@ jobs: retention-days: 90 - name: Publish to VS Code Marketplace - continue-on-error: true run: npm run publish env: VSCE_PAT: ${{ secrets.VSCE_PAT }}