@@ -49,50 +49,43 @@ outputs:
4949runs :
5050 using : " composite"
5151 steps :
52- - name : Setup Environment
52+ - name : Prepare Environment
5353 run : |
5454 mkdir -p "${RUNNER_TEMP}/php-matrix"
5555 echo PHP_MATRIX_DIR="${RUNNER_TEMP}/php-matrix" >> "$GITHUB_ENV"
5656 echo PHP_MATRIX="${RUNNER_TEMP}/php-matrix/bin/php-matrix" >> "$GITHUB_ENV"
5757 shell : bash
5858
59- - name : Download PHP Matrix (Linux arm64)
60- if : ${{ runner.os == 'Linux' && runner.arch == 'ARM64' }}
61- run : gh release download --repo typisttech/ php-matrix --output php-matrix .tar.gz --pattern "${PATTERN}" "${TAG} "
59+ - name : Determine Download Pattern (Linux arm64)
60+ if : runner.os == 'Linux' && runner.arch == 'ARM64'
61+ run : echo "PATTERN= php-matrix_Linux_arm64 .tar.gz" >> "$GITHUB_ENV "
6262 shell : bash
63- working-directory : ${{ env.PHP_MATRIX_DIR }}
64- env :
65- PATTERN : php-matrix_Linux_arm64.tar.gz
66- TAG : ${{ inputs.version }}
67- GH_TOKEN : ${{ inputs.github-token }}
6863
69- - name : Download PHP Matrix (Linux amd64)
70- if : ${{ runner.os == 'Linux' && runner.arch == 'x64' }}
71- run : gh release download --repo typisttech/ php-matrix --output php-matrix .tar.gz --pattern "${PATTERN}" "${TAG} "
64+ - name : Determine Download Pattern (Linux amd64)
65+ if : runner.os == 'Linux' && runner.arch == 'x64'
66+ run : echo "PATTERN= php-matrix_Linux_x86_64 .tar.gz" >> "$GITHUB_ENV "
7267 shell : bash
73- working-directory : ${{ env.PHP_MATRIX_DIR }}
74- env :
75- PATTERN : php-matrix_Linux_x86_64.tar.gz
76- TAG : ${{ inputs.version }}
77- GH_TOKEN : ${{ github.token }}
7868
79- - name : Download PHP Matrix (Darwin arm64)
80- if : ${{ runner.os == 'macOS' && runner.arch == 'ARM64' }}
81- run : gh release download --repo typisttech/php-matrix --output php-matrix.tar.gz --pattern "${PATTERN}" "${TAG}"
69+ - name : Determine Download Pattern (Darwin arm64)
70+ if : runner.os == 'macOS' && runner.arch == 'ARM64'
71+ run : echo "PATTERN=php-matrix_Darwin_arm64.tar.gz" >> "$GITHUB_ENV"
72+ shell : bash
73+
74+ - name : Determine Download Pattern (Darwin amd64)
75+ if : runner.os == 'macOS' && runner.arch == 'x64'
76+ run : echo "PATTERN=php-matrix_Darwin_x86_64.tar.gz" >> "$GITHUB_ENV"
77+ shell : bash
78+
79+ - name : Assert Download Pattern Determined
80+ if : env.PATTERN == ''
81+ run : exit 1
8282 shell : bash
83- working-directory : ${{ env.PHP_MATRIX_DIR }}
84- env :
85- PATTERN : php-matrix_Darwin_arm64.tar.gz
86- TAG : ${{ inputs.version }}
87- GH_TOKEN : ${{ inputs.github-token }}
8883
89- - name : Download PHP Matrix (Darwin amd64)
90- if : ${{ runner.os == 'macOS' && runner.arch == 'x64' }}
84+ - name : Download PHP Matrix
9185 run : gh release download --repo typisttech/php-matrix --output php-matrix.tar.gz --pattern "${PATTERN}" "${TAG}"
9286 shell : bash
9387 working-directory : ${{ env.PHP_MATRIX_DIR }}
9488 env :
95- PATTERN : php-matrix_Darwin_x86_64.tar.gz
9689 TAG : ${{ inputs.version }}
9790 GH_TOKEN : ${{ inputs.github-token }}
9891
0 commit comments