diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 8a58ead..1e30910 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -28,8 +28,12 @@ jobs: with: node-version: 16 registry-url: https://registry.npmjs.org/ - - run: yarn - - run: yarn build - - run: yarn publish + - run: | + yarn + yarn build + yarn publish + chmod +x "${GITHUB_WORKSPACE}/scripts/purge-cache.sh" + "${GITHUB_WORKSPACE}/scripts/purge-cache.sh" + env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/manifest.json b/manifest.json index 075b84a..a518826 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "altair-graphql-plugin-github-sync", - "version": "1.0.5", + "version": "1.0.6", "display_name": "Altair Github Sync", "description": "Save altair collections to github gist", "author_email": "boydaihungst@gmail.com", diff --git a/package.json b/package.json index 2161a95..cb842cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "altair-graphql-plugin-github-sync", - "version": "1.0.5", + "version": "1.0.6", "private": false, "description": "Altair Sync Gist plugin", "scripts": { diff --git a/scripts/purge-cache.sh b/scripts/purge-cache.sh new file mode 100755 index 0000000..03b9f67 --- /dev/null +++ b/scripts/purge-cache.sh @@ -0,0 +1,12 @@ +#!/bin/bash +echo "Current time: $(date +%T)" +echo "Sleep 5s" +sleep 5 +echo "Start purge cache" +curl "https://purge.jsdelivr.net/npm/altair-graphql-plugin-github-sync@latest/dist/style.css" +curl "https://purge.jsdelivr.net/npm/altair-graphql-plugin-github-sync@latest/dist/github-sync.umd.js" +curl "https://purge.jsdelivr.net/npm/altair-graphql-plugin-github-sync@latest/package.json" +curl "https://purge.jsdelivr.net/npm/altair-graphql-plugin-github-sync@latest/manifest.json" +curl "https://purge.jsdelivr.net/npm/altair-graphql-plugin-github-sync@latest/package-lock.json" +echo "" +echo "Caching purged"