From bd9a83d5242a2bb294987fc4754358386a0b5f7e Mon Sep 17 00:00:00 2001 From: Sergii Stotskyi Date: Wed, 22 Nov 2023 00:16:28 +0200 Subject: [PATCH] fix: pre-builds everything to prevent types issues in co-dependent packages --- .github/workflows/release.yml | 8 +++++--- packages/dx/bin/release-packages.sh | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 37e17dc6f..acf949706 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,6 +37,8 @@ jobs: ${{ runner.os }}- - name: Install dependencies run: pnpm install + - name: Build + run: pnpm run -r build - name: Release env: GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} @@ -48,8 +50,8 @@ jobs: fi changed_paths="$(gh pr view --json files --jq '.files.[].path' "${{ github.event.pull_request.number }}" | cut -d / -f 1,2 | uniq)"; - ./packages/dx/bin/release-packages.sh "$changed_paths"; + released_packages=$(./packages/dx/bin/release-packages.sh "$changed_paths"); - if [ "${{github.event.pull_request.number}}" != "" ]; then - gh pr comment "${{ github.event.pull_request.number }}" --body "🚀 Released in ${released_packages[@]}" + if [[ "${{github.event.pull_request.number}}" != "" && "$released_packages" != "" ]]; then + gh pr comment "${{ github.event.pull_request.number }}" --body "🚀 Released in ${released_packages}" fi diff --git a/packages/dx/bin/release-packages.sh b/packages/dx/bin/release-packages.sh index e5def8e22..fa9dd6610 100755 --- a/packages/dx/bin/release-packages.sh +++ b/packages/dx/bin/release-packages.sh @@ -38,3 +38,4 @@ for path in $changed_packages; do done echo "🚀 Released in ${released_packages[@]}" >> $GITHUB_STEP_SUMMARY +echo "${released_packages[@]}"