|
37 | 37 |
|
38 | 38 | # Cancels all previous workflow runs for pull requests that have not completed. |
39 | 39 | concurrency: |
40 | | - # The concurrency group contains the workflow name and the branch name for pull requests |
| 40 | + # The concurrency group contains the workflow name and the pull request number for pull requests |
41 | 41 | # or the commit hash for any other events. |
42 | | - group: ${{ github.workflow }}-${{ inputs.wp-version || github.event_name == 'pull_request' && github.head_ref || github.sha }} |
| 42 | + group: ${{ github.workflow }}-${{ inputs.wp-version || github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }} |
43 | 43 | cancel-in-progress: true |
44 | 44 |
|
45 | 45 | # Disable permissions for all available scopes by default. |
@@ -138,15 +138,15 @@ jobs: |
138 | 138 | - name: Set up WP-CLI |
139 | 139 | uses: $/.github/actions/setup-wp-cli |
140 | 140 | with: |
141 | | - version: ${{ contains( fromJSON('["5.4", "5.5"]'), matrix.php ) && '2.4.0' || 'latest' }} |
| 141 | + version: ${{ contains( fromJSON('["5.4", "5.5"]'), matrix.php ) && '2.4.0' || contains( fromJSON('["5.6", "7.0", "7.1"]'), matrix.php ) && '2.12.0' || 'latest' }} |
142 | 142 |
|
143 | | - # WP-CLI extracts tarballs with PharData, which truncates paths longer than 100 characters. |
144 | | - # Nightly builds are only available as a zip, which is not affected. |
| 143 | + # WP-CLI 2.x extracts tarballs with PharData, which truncates paths longer than 100 characters. |
| 144 | + # Zip archives are not affected, so download the zip for every version. |
145 | 145 | - name: Download WordPress |
146 | 146 | run: | |
147 | 147 | case "${WP_VERSION}" in |
148 | 148 | nightly|trunk) wp core download --version=nightly ;; |
149 | | - *) curl -fsSL "https://wordpress.org/wordpress-${WP_VERSION}.tar.gz" | tar xz --strip-components=1 ;; |
| 149 | + *) wp core download "https://wordpress.org/wordpress-${WP_VERSION}.zip" ;; |
150 | 150 | esac |
151 | 151 | env: |
152 | 152 | WP_VERSION: ${{ inputs.wp-version || 'nightly' }} |
|
0 commit comments