also looking at this
chore(deps): update dependency actions/download-artifact to v5.0.0
#178
1 file
+638
-860
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -192,11 +192,24 @@ jobs: | ||
| 192 | 192 | - name: Create tarball (Unix) |
| 193 | 193 | if: matrix.platform != 'win32' |
| 194 | 194 | run: | |
| 195 | # Ensure binaries directory exists and check for builds | |
| 196 | if [ ! -d "binaries" ]; then | |
| 197 | echo "❌ Binaries directory not found" | |
| 198 | ls -la | |
| 199 | exit 1 | |
| 200 | fi | |
| 201 | ||
| 195 | 202 | cd binaries |
| 196 | 203 | BINARY_NAME="php-$-$-$-$" |
| 204 | ||
| 205 | echo "🔍 Looking for binary directory: $BINARY_NAME" | |
| 206 | ls -la | |
| 207 | ||
| 197 | 208 | if [ -d "$BINARY_NAME" ]; then |
| 198 | # Create metadata file | |
| 199 | echo '{"php_version":"$","platform":"$","arch":"$","config":"$","built_at":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' > "$BINARY_NAME/metadata.json" | |
| 209 | # Create metadata file if it doesn't exist | |
| 210 | if [ ! -f "$BINARY_NAME/metadata.json" ]; then | |
| 211 | echo '{"php_version":"$","platform":"$","arch":"$","config":"$","built_at":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' > "$BINARY_NAME/metadata.json" | |
| 212 | fi | |
| 200 | 213 | |
| 201 | 214 | # Create tarball |
| 202 | 215 | tar -czf "$BINARY_NAME.tar.gz" "$BINARY_NAME" |
| @@ -204,24 +217,39 @@ jobs: | ||
| 204 | 217 | ls -lh "$BINARY_NAME.tar.gz" |
| 205 | 218 | else |
| 206 | 219 | echo "❌ Binary directory not found: $BINARY_NAME" |
| 220 | echo "Available directories:" | |
| 221 | ls -la | |
| 207 | 222 | exit 1 |
| 208 | 223 | fi |
| 209 | 224 | |
| 210 | 225 | - name: Create tarball (Windows) |
| 211 | 226 | if: matrix.platform == 'win32' |
| 212 | 227 | run: | |
| 228 | # Ensure binaries directory exists and check for builds | |
| 229 | if (-not (Test-Path -Path "binaries" -PathType Container)) { | |
| 230 | Write-Host "❌ Binaries directory not found" | |
| 231 | Get-ChildItem | |
| 232 | exit 1 | |
| 233 | } | |
| 234 | ||
| 213 | 235 | cd binaries |
| 214 | 236 | $BINARY_NAME = "php-$-$-$-$" |
| 237 | ||
| 238 | Write-Host "🔍 Looking for binary directory: $BINARY_NAME" | |
| 239 | Get-ChildItem | |
| 240 | ||
| 215 | 241 | if (Test-Path -Path $BINARY_NAME -PathType Container) { |
| 216 | # Create metadata file | |
| 217 | $metadata = @{ | |
| 218 | php_version = "${{ matrix.php_version }}" | |
| 219 | platform = "$" | |
| 220 | arch = "$" | |
| 221 | config = "$" | |
| 222 | built_at = (Get-Date -Format "yyyy-MM-ddTHH:mm:ssZ") | |
| 223 | } | ConvertTo-Json | |
| 224 | $metadata | Out-File -FilePath "$BINARY_NAME\metadata.json" -Encoding UTF8 | |
| 242 | # Create metadata file if it doesn't exist | |
| 243 | if (-not (Test-Path -Path "$BINARY_NAME\metadata.json")) { | |
| 244 | $metadata = @{ | |
| 245 | php_version = "$" | |
| 246 | platform = "$" | |
| 247 | arch = "$" | |
| 248 | config = "$" | |
| 249 | built_at = (Get-Date -Format "yyyy-MM-ddTHH:mm:ssZ") | |
| 250 | } | ConvertTo-Json | |
| 251 | $metadata | Out-File -FilePath "$BINARY_NAME\metadata.json" -Encoding UTF8 | |
| 252 | } | |
| 225 | 253 | |
| 226 | 254 | # Create zip archive (Windows equivalent of tarball) |
| 227 | 255 | Compress-Archive -Path $BINARY_NAME -DestinationPath "$BINARY_NAME.zip" -Force |
| @@ -229,6 +257,8 @@ jobs: | ||
| 229 | 257 | Get-ChildItem "$BINARY_NAME.zip" | Format-List Name, Length |
| 230 | 258 | } else { |
| 231 | 259 | Write-Host "❌ Binary directory not found: $BINARY_NAME" |
| 260 | Write-Host "Available directories:" | |
| 261 | Get-ChildItem | |
| 232 | 262 | exit 1 |
| 233 | 263 | } |
| 234 | 264 | |