Skip to content

Commit

Permalink
Fix release3 (#844)
Browse files Browse the repository at this point in the history
  • Loading branch information
stalniy authored Nov 21, 2023
1 parent cf9bef5 commit 2ed300c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,18 @@ jobs:
GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.RELEASE_NPM_TOKEN }}
run: |
changed_packages=$(gh pr view --json files --jq '.files.[].path' "${{ github.event.pull_request.number }}" | cut -d / -f 1,2 | uniq | grep ./packages)
changed_paths=$(gh pr view --json files --jq '.files.[].path' "${{ github.event.pull_request.number }}" | cut -d / -f 1,2 | uniq)
changed_packages=$(echo "$changed_paths" | grep ./packages)
pnpm_options=''
for path in $changed_packages; do
pnpm_options="${pnpm_options} --filter ./${path}"
done
if [ "$pnpm_options" = "" ]; then
echo -e "No packages to release:\n ${changed_paths}" >> $GITHUB_STEP_SUMMARY
exit 0;
fi
echo "running: pnpm run -r $pnpm_options release" >> $GITHUB_STEP_SUMMARY
pnpm run -r $pnpm_options release
Expand Down

0 comments on commit 2ed300c

Please sign in to comment.