Skip to content

Commit

Permalink
chore: fix release workflow package name extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
stalniy committed Nov 21, 2023
1 parent 4988f12 commit 1b93ba7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ 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)
changed_packages=$(gh pr view --json files --jq '.files.[].path' "${{ github.event.pull_request.number }}" | cut -d / -f 1,2 | uniq | grep ./packages)
pnpm_options=''
for path in $changed_packages; do
pnpm_options="${pnpm_options} --filter ./${path}"
Expand All @@ -53,8 +53,8 @@ jobs:
released_packages=()
for path in $changed_packages; do
package_name=$(grep '"name":' $path | cut -d : -f 2 | cut -d '"' -f 2)
package_version=$(grep '"version":' $path | cut -d : -f 2 | cut -d '"' -f 2)
package_name=$(grep '"name":' $path/package.json | cut -d : -f 2 | cut -d '"' -f 2)
package_version=$(grep '"version":' $path/package.json | cut -d : -f 2 | cut -d '"' -f 2)
released_packages[${#released_packages[@]}]="${package_name}@${package_version}"
done
Expand Down

0 comments on commit 1b93ba7

Please sign in to comment.