Skip to content

Commit a697b2b

Browse files
authored
fix
1 parent 57b8197 commit a697b2b

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/build-php.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,18 @@ jobs:
123123
- name: Zip PHP binary, copy metadata
124124
shell: bash
125125
run: |
126+
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
127+
powershell Compress-Archive -Path "../static-php-cli/buildroot/bin/php" -DestinationPath "bin/${env:SPC_BUILD_OS}/${env:SPC_BUILD_ARCH}/php-${{ matrix.version }}.zip"
128+
else
129+
zip bin/${{ env.SPC_BUILD_OS }}/${{ env.SPC_BUILD_ARCH }}/php-${{ matrix.version }}.zip ../static-php-cli/buildroot/bin/php
130+
fi
126131
zip bin/${{ env.SPC_BUILD_OS }}/${{ env.SPC_BUILD_ARCH }}/php-${{ matrix.version }}.zip ../static-php-cli/buildroot/bin/php
127132
cp ../static-php-cli/buildroot/license/* license-files/
128133
cp ../static-php-cli/buildroot/build-extensions.json build-meta/build-extensions-${{ env.SPC_BUILD_OS }}.json
129134
cp ../static-php-cli/buildroot/build-libraries.json build-meta/build-libraries-${{ env.SPC_BUILD_OS }}.json
130135
131136
- name: Create Pull Request
137+
if: matrix.os != 'windows-latest'
132138
uses: peter-evans/create-pull-request@v7
133139
with:
134140
branch: update-php-${{ matrix.version }}-${{ env.SPC_BUILD_OS }}-${{ env.SPC_BUILD_ARCH }}
@@ -137,5 +143,20 @@ jobs:
137143
body: |
138144
PHP: ${{ matrix.version }}
139145
Exts: ${{ env.PHP_EXTENSIONS }}
140-
OS+arch: ${{ env.SPC_BUILD_OS }} ${{ env.SPC_BUILD_ARCH }}.
146+
OS: ${{ env.SPC_BUILD_OS }}
147+
Arch: ${{ env.SPC_BUILD_ARCH }}
148+
base: main
149+
150+
- name: Create Pull Request (Win)
151+
if: matrix.os == 'windows-latest'
152+
uses: peter-evans/create-pull-request@v7
153+
with:
154+
branch: update-php-${{ matrix.version }}-${env:SPC_BUILD_OS}-${env:SPC_BUILD_ARCH}
155+
title: "Update PHP ${{ matrix.version }} build for ${env:SPC_BUILD_OS} ${env:SPC_BUILD_ARCH}"
156+
commit-message: "build"
157+
body: |
158+
PHP: ${{ matrix.version }}
159+
Exts: ${env:PHP_EXTENSIONS}
160+
OS: ${env:SPC_BUILD_OS}
161+
Arch: ${env:SPC_BUILD_ARCH}
141162
base: main

0 commit comments

Comments
 (0)