@@ -10,43 +10,43 @@ echo "-- setup git"
1010git config --global user.email " you@example.com"
1111git config --global user.name " Github Action"
1212
13- # release vanilla lib
14- echo " -- release vanilla lib"
13+ # release embed lib
14+ echo " -- release embed lib"
1515cd $REPO_ROOT /packages/embed
1616yarn release-vanilla
1717
18- # bump vanilla lib
19- echo " -- bump vanilla lib"
18+ # bump embed in embed-react
19+ echo " -- bump embed in embed-react"
20+ EMBED_VERSION=$( npm view @typeform/embed version)
21+ echo " Latest @typeform/embed version: $EMBED_VERSION "
2022cd $REPO_ROOT /packages/embed-react
21- yarn upgrade @typeform/embed
23+ sed -i.bak " s/ \" @typeform\ /embed\" : \" .* \" / \" @typeform\/embed \" : \" $EMBED_VERSION \" / " package.json && rm package.json.bak
2224
23- # commit vanilla bump in react lib
24- echo " -- commit vanilla lib bump in react lib "
25+ # commit embed bump in embed- react
26+ echo " -- commit embed bump in embed- react"
2527cd $REPO_ROOT
2628git add packages/embed-react
2729git commit -m ' feat: Bump @typeform/embed in @typeform/embed-react package [skip ci]'
2830git push https://$GITHUB_TOKEN @github.com/Typeform/embed.git
2931
30- # release react lib , will also commit all changes in react lib including vanilla lib bump
31- echo " -- release react lib, will also commit all changes in react lib including vanilla lib bump"
32+ # release embed- react, will also commit all changes in embed- react including embed bump
33+ echo " -- release embed- react lib, will also commit all changes in embed- react including embed bump"
3234cd $REPO_ROOT /packages/embed-react
3335yarn release
3436
35- # bump vanilla and react libs in demos
36- echo " -- bump vanilla and react libs in demos"
37+ # bump embed and embed-react in demos
38+ echo " -- bump embed and embed-react in demos"
39+ EMBED_VERSION=$( npm view @typeform/embed version)
40+ EMBED_REACT_VERSION=$( npm view @typeform/embed-react version)
41+ echo " Latest @typeform/embed version: $EMBED_VERSION "
42+ echo " Latest @typeform/embed-react version: $EMBED_REACT_VERSION "
3743cd $REPO_ROOT /packages/demo-nextjs
38- yarn upgrade @typeform/embed
39- yarn upgrade @typeform/embed-react
44+ sed -i.bak " s/ \" @typeform\ /embed\" : \" .* \" / \" @typeform\/embed \" : \" $EMBED_VERSION \" / " package.json && rm package.json.bak
45+ sed -i.bak " s/ \" @typeform\ /embed-react\" : \" .* \" / \" @typeform\/embed-react \" : \" $EMBED_REACT_VERSION \" / " package.json && rm package.json.bak
4046
41- cd $REPO_ROOT /packages/demo-react
42- yarn upgrade @typeform/embed-react
43-
44- cd $REPO_ROOT /packages/demo-webpack
45- yarn upgrade @typeform/embed
46-
47- # commit vanilla and react lib bumps in demos
48- echo " -- commit vanilla and react lib bumps in demos"
47+ # commit embed and embed-react bumps in demo-nextjs
48+ echo " -- commit embed and embed-react bumps in demp-nextjs"
4949cd $REPO_ROOT
50- git add packages/demo-*
51- git commit -m ' chore: Bump @typeform/embed and @typeform/embed-react in demo packages '
50+ git add packages/demo-nextjs
51+ git commit -m ' chore: Bump @typeform/embed and @typeform/embed-react in demo-nextjs '
5252git push https://$GITHUB_TOKEN @github.com/Typeform/embed.git
0 commit comments