From ee4121deffe71a279986a7d025bce6056afaa605 Mon Sep 17 00:00:00 2001 From: Valentin Kruglikov Date: Wed, 8 Jan 2025 20:52:55 +0800 Subject: [PATCH] Test badges --- .github/badges/.keep | 0 .github/workflows/test-bages.yml | 28 +++++++++++++++++++++++++ README.md | 35 ++++++++++++++++++++++++-------- 3 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 .github/badges/.keep create mode 100644 .github/workflows/test-bages.yml diff --git a/.github/badges/.keep b/.github/badges/.keep new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/test-bages.yml b/.github/workflows/test-bages.yml new file mode 100644 index 0000000..d406e31 --- /dev/null +++ b/.github/workflows/test-bages.yml @@ -0,0 +1,28 @@ +name: Badges + +on: + push: + branches: ['master'] + +jobs: + badges: + name: Validation and Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Update badges + run: | + PACKAGE_VERSION=$(jq -r '.version' packages/extension/package.json) + FORMATTED_DATE=$(date +"%d.%m.%Y") + + echo $PACKAGE_VERSION + echo $TIMESTAMP + + curl -o .github/badges/extension-version.svg "https://img.shields.io/badge/extension_version-v$PACKAGE_VERSION-orange" + + git config --local user.name "github-actions[bot]" + + git add --all + git commit -m "Update extension version badge to $PACKAGE_VERSION" + git push \ No newline at end of file diff --git a/README.md b/README.md index f2dc1bc..2d26d15 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@

DevTools logo - Mock Service Worker logo - Chrome Web Store logo + + Mock Service Worker logo + + + Chrome Web Store logo +

Mock Service Worker DevTools Extension

@@ -72,15 +76,28 @@ setupWorker(...handlers).start({ }) ``` -### Install Chrome Extension +## Install Chrome Extension -Chrome Extension is not yet published to Chrome Web Store, because it's in waiting for review. +### Repository build -[![Chrome Web Store](https://img.shields.io/chrome-web-store/v/jkclaelcdjjledfendcippjbhngkhkpm.svg)](https://chrome.google.com/webstore/detail/jkclaelcdjjledfendcippjbhngkhkpm) +[![Repository Build version](./.github/badges/extension-version.svg)](https://github.com/vkruglikov/msw-devtools-extension/releases/tag/%40msw-devtools%2Fextension%40latest) + +You can install it downloading the build and [loading it as an unpacked extension](./packages/extension/README.md). + +> **⚠️ WARNING** +> If you chose to install the extension from the repository, you will need install `@msw-devtools/connect` with `--save-exact` flag to avoid version mismatch. -You can only install it downloading the build and [loading it as an unpacked extension](./packages/extension/README.md). +### Chrome Web Store -[![Download Chrome Extension](https://img.shields.io/badge/download-chrome_extension_dist-ff6a33)](https://github.com/vkruglikov/msw-devtools-extension/releases/tag/%40msw-devtools%2Fextension%40latest) +[![Chrome Web Store](https://img.shields.io/chrome-web-store/v/jkclaelcdjjledfendcippjbhngkhkpm.svg?label=extension+version)](https://chrome.google.com/webstore/detail/jkclaelcdjjledfendcippjbhngkhkpm) +![Chrome Web Store Last Updated](https://img.shields.io/chrome-web-store/last-updated/jkclaelcdjjledfendcippjbhngkhkpm?label=last+release&color=green) + +> **⚠️ WARNING** +> Chrome Web Store version can be outdated because of the review process. +> +> If you want to install from the Chrome Web Store, you need to check the latest version in the repository and compare it with the Chrome Web Store version. +> +> We recommend using the latest build from the repository. ### Upload JSON Config to extension @@ -88,7 +105,9 @@ You can only install it downloading the build and [loading it as an unpacked ext ### See the demo -[@msw-devtools/demo](https://vkruglikov.github.io/msw-devtools-extension/) +At this page we have installed msw and initialized with the `createResponseResolver` function from `@msw-devtools/connect`. + +[msw-devtools.com](https://vkruglikov.github.io/msw-devtools-extension/) ## Roadmap Features 🚧