Skip to content

Commit

Permalink
chore: use postversion script instead of breaking out lerna commands
Browse files Browse the repository at this point in the history
  • Loading branch information
elylucas committed May 25, 2024
1 parent 55287c2 commit bc726ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,12 @@ jobs:
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
# run version
if [ ${{ github.ref_name }} = development ]; then
npx lerna version --conventional-commits --conventional-prerelease --exact --force-publish --preid dev-$(date +%Y%m%dT%H%M)-$(git rev-parse HEAD | cut -c1-7) --no-private --no-changelog --no-push --yes
npx lerna publish --conventional-commits --conventional-prerelease --exact --force-publish --preid dev-$(date +%Y%m%dT%H%M)-$(git rev-parse HEAD | cut -c1-7) --dist-tag dev --no-changelog --no-push --yes --no-private
elif [ ${{ github.ref_name }} = next ]; then
npx lerna version --conventional-commits --conventional-prerelease --exact --force-publish --preid beta --yes --no-private --no-changelog
npx lerna publish --conventional-commits --conventional-prerelease --exact --force-publish --preid beta --dist-tag next --no-changelog --yes --no-private
else
npx lerna version --conventional-commits --conventional-graduate --exact --force-publish --yes --no-private
fi
# update sdk version in dist
npm run update-dist-version --prefix packages/experience-builder-sdk
# run publish
if [ ${{ github.ref_name }} = development ]; then
npx lerna publish from-git --exact --yes --dist-tag dev
elif [ ${{ github.ref_name }} = next ]; then
npx lerna publish from-git --exact --yes --dist-tag next
else
npx lerna publish from-git --exact --yes --dist-tag latest --create-release github
npx lerna publish --conventional-commits --conventional-graduate --exact --force-publish --yes --no-private --dist-tag latest --create-release github
fi
- name: 'Merge changes downstream'
env:
Expand Down
1 change: 1 addition & 0 deletions packages/experience-builder-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"prepare": "node ./bin/injectSDKVersion.cjs",
"prebuild": "npm run clean && node ./bin/injectSDKVersion.cjs",
"build": "rollup -c rollup.config.mjs",
"postversion": "npm run update-dist-version",
"watch": "vite build --watch",
"test": "NODE_ENV=test jest",
"test:watch": "NODE_ENV=test jest --watch",
Expand Down

0 comments on commit bc726ac

Please sign in to comment.