From 4ad9f0d0b9a456577bc1f799585de006424fa3cf Mon Sep 17 00:00:00 2001 From: Sebastien Tardif Date: Fri, 5 Jun 2026 17:39:41 -0700 Subject: [PATCH] feat: cache VS Code Marketplace version badge via Gist Replace the unreliable vsmarketplacebadges.dev badge with a shields.io endpoint badge that reads from a GitHub Gist JSON file. The release workflow now writes the version to the same Gist used for coverage, so the badge never hits a flaky third-party service. - Add version extraction and dynamic-badges-action step to release.yml - Update README badge URL to use Gist endpoint - Remove vsmarketplacebadges.dev from lychee exclude list - Seed Gist with initial version.json for v0.0.1 Signed-off-by: Sebastien Tardif --- .github/workflows/release.yml | 17 +++++++++++++++++ README.md | 2 +- lychee.toml | 2 -- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 61b3913..b280251 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -74,3 +74,20 @@ jobs: - name: Publish to Open VSX if: env.OVSX_PAT != '' run: npx ovsx publish patchloom.vsix + - name: Extract version from tag + id: version + run: echo "version=${TAG_NAME#patchloom-}" >> "$GITHUB_OUTPUT" + env: + TAG_NAME: ${{ needs.release-please.outputs.tag_name }} + - name: Update version badge + continue-on-error: true + uses: schneegans/dynamic-badges-action@0e50b8bad39e7e1afd3e4e9c2b7dd145fad07501 # v1.8.0 + with: + auth: ${{ secrets.GIST_TOKEN }} + gistID: d01e4551b744b77e2927555e43a4b935 + filename: version.json + label: VS Code Marketplace + message: ${{ steps.version.outputs.version }} + color: blue + namedLogo: visualstudiocode + logoColor: white diff --git a/README.md b/README.md index bafaad6..28e4369 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![CI](https://github.com/patchloom/patchloom-vscode/actions/workflows/ci.yml/badge.svg)](https://github.com/patchloom/patchloom-vscode/actions/workflows/ci.yml) [![Security](https://github.com/patchloom/patchloom-vscode/actions/workflows/security.yml/badge.svg)](https://github.com/patchloom/patchloom-vscode/actions/workflows/security.yml) [![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/SebTardif/d01e4551b744b77e2927555e43a4b935/raw/coverage.json)](https://github.com/patchloom/patchloom-vscode/actions/workflows/ci.yml) -[![VS Code Marketplace](https://vsmarketplacebadges.dev/version/patchloom.patchloom.svg)](https://marketplace.visualstudio.com/items?itemName=patchloom.patchloom) +[![VS Code Marketplace](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/SebTardif/d01e4551b744b77e2927555e43a4b935/raw/version.json)](https://marketplace.visualstudio.com/items?itemName=patchloom.patchloom) [![Open VSX](https://img.shields.io/open-vsx/v/patchloom/patchloom)](https://open-vsx.org/extension/patchloom/patchloom) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/patchloom/patchloom-vscode/badge)](https://securityscorecards.dev/viewer/?uri=github.com/patchloom/patchloom-vscode) [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/13100/badge)](https://www.bestpractices.dev/projects/13100) diff --git a/lychee.toml b/lychee.toml index 3b3e3fd..fc2026c 100644 --- a/lychee.toml +++ b/lychee.toml @@ -16,6 +16,4 @@ exclude = [ "https://marketplace.visualstudio.com/items\\?itemName=patchloom\\.patchloom", "https://open-vsx.org/extension/patchloom/patchloom", "https://github.com/patchloom/patchloom-vscode/compare/patchloom-v", - # Badge SVG endpoints are unreliable for link checking (transient 500s) - "https://vsmarketplacebadges\\.dev/", ]