-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,13 +27,18 @@ jobs: | |
with: | ||
node-version: 18.x | ||
|
||
- name: Publish to NPM | ||
run: ./scripts/publish.sh | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Update RELEASES.MD | ||
uses: vonage/[email protected] | ||
|
||
- name: Commit release | ||
- name: Commit release notes | ||
run: | | ||
git config --local user.name github-actions | ||
git config --local user.email [email protected] | ||
git add RELEASES.md | ||
git commit -m "chore: updated release log" | ||
git push --force-with-lease | ||
git push --force-with-leaseCallUpdateResultc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Enable error handling | ||
set -e | ||
|
||
# Run the `lerna changed` command to get the list of changed packages | ||
changed_packages=$(npm run --silent lerna -- changed) | ||
|
||
# Loop through each changed package | ||
echo "$changed_packages" | while read -r package; do | ||
# Extract the package name without the `@vonage/` prefix | ||
package_name=${package#@vonage/} | ||
|
||
# Change directory into the package folder and publish | ||
if [ -d "packages/$package_name" ]; then | ||
cd "packages/$package_name" || exit | ||
echo "Publishing $package_name..." | ||
if ! npm publish; then | ||
echo "Failed to publish $package_name" >&2 | ||
exit 1 | ||
fi | ||
cd - > /dev/null || exit # Return to the previous directory | ||
else | ||
echo "Directory packages/$package_name does not exist, skipping..." | ||
fi | ||
done | ||
|
||
echo "Publishing process completed!" |