From 660984d3c7c6d399e1f073b8bdd6414c3b6af2a0 Mon Sep 17 00:00:00 2001 From: Benjamin DeMann Date: Thu, 5 Sep 2024 15:32:49 -0600 Subject: [PATCH] checkout outputs --- .github/scripts/get_tests.sh | 1 + .github/scripts/publish_github_action.sh | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/scripts/get_tests.sh b/.github/scripts/get_tests.sh index cc34aa7695..8c717e6f07 100755 --- a/.github/scripts/get_tests.sh +++ b/.github/scripts/get_tests.sh @@ -74,6 +74,7 @@ generate_json() { all_directories="" for dir in "${DIRECTORIES[@]}"; do all_directories+=$(discover_directories "$dir") + all_directories+=$'\n' done # Initialize an empty variable to store the JSON result diff --git a/.github/scripts/publish_github_action.sh b/.github/scripts/publish_github_action.sh index 95f6aad775..aedc2e59b3 100755 --- a/.github/scripts/publish_github_action.sh +++ b/.github/scripts/publish_github_action.sh @@ -8,7 +8,7 @@ VERSION=$1 directories_json_string_with_linebreaks=$2 directories_json_string="${directories_json_string_with_linebreaks//$'\\n'/''}" -directories=$(echo "$directories_json_string" | jq -c -r '.[]') +directories=$(echo "$directories_json_string" | jq -c -r '.[] | .path') sed -E -i "s/(\"version\": \")(.*)(\")/\1$VERSION\3/" package.json sed -E -i "s/(\"version\": \")(.*)(\")/\1$VERSION\3/" dfx_extension/extension.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75ad85b058..dc3ae742d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,4 +79,4 @@ jobs: run: | BRANCH_NAME="${{ github.head_ref }}" RELEASE_VERSION="${BRANCH_NAME:9}" - ./.github/scripts/publish_github_action.sh $RELEASE_VERSION ${{ toJSON(needs.get-tests.outputs.tests.*.path) }} + ./.github/scripts/publish_github_action.sh $RELEASE_VERSION ${{ toJSON(needs.get-tests.outputs.tests) }}