diff --git a/web-embeds/README.md b/web-embeds/README.md index 0f23cafb..188c6a30 100644 --- a/web-embeds/README.md +++ b/web-embeds/README.md @@ -4,29 +4,7 @@ Apollo React Embeds are pre-built components that can be easily added to third-p # Deployment -Follow the steps below to deploy your apollos-embeds: - -## Automated - -1. Run `npm bump` - -## Manual - -1. Update the package version in the `package.json` file. -2. Run `yarn build` to build the new version of the widget. -3. Commit and push the new JS and CSS build files to GitHub. -4. Then, run `npm publish`. Note that you need to be a member of the apollosproject organization to publish. -5. Go to https://www.jsdelivr.com/tools/purge and paste in the following to purge the cache on jsdelivr. Otherwise, it could take up to seven days to see our changes in client sites. - -`https://cdn.jsdelivr.net/npm/@apollosproject/apollos-embeds@latest/widget/index.js, https://cdn.jsdelivr.net/npm/@apollosproject/apollos-embeds@latest/widget/index.css, https://cdn.jsdelivr.net/npm/@apollosproject/apollos-embeds` - -The JS file used to embed these widgets is hosted on GitHub and picked up by [jsdelivr.com](https://www.jsdelivr.com/) automatically, as long as the repository is public. - -That's it! Your updated version of the apollos-embeds will be available for use. - -_⚠️ React needs to be imported in every file it is used, otherwise the js build file will error when you embed it in your website._ - ---- +`npm run bump` # Using Embeds in Webflow diff --git a/web-embeds/package.json b/web-embeds/package.json index fa30f3ab..97b34300 100644 --- a/web-embeds/package.json +++ b/web-embeds/package.json @@ -1,7 +1,7 @@ { "name": "@apollosproject/apollos-embeds", "description": "Apollos React embed widgets", - "version": "0.1.43", + "version": "0.1.44", "license": "MIT", "eslintIgnore": [ "/node_modules", @@ -60,7 +60,7 @@ "dev": "craco start", "build": "node scripts/build.js", "test": "craco test", - "bump": "npm version patch && yarn build && git add . && git commit -m 'version bump' && git push && git push --tags && npm publish && npm run flush-cdn", + "bump": "./scripts/bump.sh && npm publish && npm version 0.0.1 && npm run flush-cdn", "format": "prettier --write .", "lint": "eslint --cache --cache-location ./node_modules/.cache/eslint .", "flush-cdn": "./flush-cdn-cache.sh" diff --git a/web-embeds/scripts/bump.sh b/web-embeds/scripts/bump.sh new file mode 100755 index 00000000..e963fa9e --- /dev/null +++ b/web-embeds/scripts/bump.sh @@ -0,0 +1,3 @@ +VERSION="$(npm show @apollosproject/apollos-embeds version)" +npm version $VERSION +npm version patch