Skip to content

Commit

Permalink
ci: update github action purge cache
Browse files Browse the repository at this point in the history
  • Loading branch information
boydaihungst committed Mar 29, 2022
1 parent ea6f98c commit b1e75f6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
12 changes: 12 additions & 0 deletions scripts/purge-cache.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit b1e75f6

Please sign in to comment.