Skip to content

Commit 3436332

Browse files
authored
Update build-php-windows.yml
1 parent 6086705 commit 3436332

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

.github/workflows/build-php-windows.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,21 @@ jobs:
2323
steps:
2424
- name: "Process env string"
2525
id: process-env
26-
shell: bash
2726
run: |
28-
case "${{ matrix.combination }}" in
29-
spc-min)
30-
echo "EXTENSIONS=ctype,fileinfo,mbstring,tokenizer,phar" >> "$GITHUB_OUTPUT"
31-
echo "DEPLOY_TARGET=${{ secrets.DEPLOY_SERVER_TARGET_WINDOWS_SPC_MIN }}" >> "$GITHUB_OUTPUT"
32-
;;
33-
esac
34-
35-
case "${{ matrix.runner }}" in
36-
windows-latest)
37-
echo "OS=windows" >> "$GITHUB_OUTPUT"
38-
echo "ARCH=x86_64" >> "$GITHUB_OUTPUT"
39-
echo "CMD=bin/spc" >> "$GITHUB_OUTPUT"
40-
;;
41-
esac
27+
switch ("${{ matrix.combination }}") {
28+
"spc-min" {
29+
Add-Content -Path $env:GITHUB_OUTPUT -Value "EXTENSIONS=ctype,fileinfo,mbstring,tokenizer,phar"
30+
Add-Content -Path $env:GITHUB_OUTPUT -Value "DEPLOY_TARGET=$($env:secrets_DEPLOY_SERVER_TARGET_WINDOWS_SPC_MIN)"
31+
}
32+
}
33+
34+
switch ("${{ matrix.runner }}") {
35+
"windows-latest" {
36+
Add-Content -Path $env:GITHUB_OUTPUT -Value "OS=windows"
37+
Add-Content -Path $env:GITHUB_OUTPUT -Value "ARCH=x86_64"
38+
Add-Content -Path $env:GITHUB_OUTPUT -Value "CMD=bin/spc"
39+
}
40+
}
4241
4342
- name: "Checkout remote"
4443
if: github.repository != 'crazywhalecc/static-php-cli'
@@ -91,7 +90,7 @@ jobs:
9190
${{ steps.process-env.outputs.CMD }} doctor --auto-fix
9291
${{ steps.process-env.outputs.CMD }} install-pkg upx
9392
94-
${{ steps.process-env.outputs.CMD }} build --build-cli --build-micro "${{ matrix.extensions }}" --debug --with-upx-pack
93+
${{ steps.process-env.outputs.CMD }} build --build-cli --build-micro "${{ steps.process-env.outputs.EXTENSIONS }}" --debug --with-upx-pack
9594
9695
$PHPVER = ${{ steps.process-env.outputs.CMD }} dev:php-ver
9796
New-Item -ItemType Directory -Force -Path dist

0 commit comments

Comments
 (0)