Skip to content

Commit 741767a

Browse files
committed
Use compiler name output from setup-php-sdk action in packaging step
1 parent ef4a6e8 commit 741767a

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

.github/actions/windows/build/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ inputs:
1111
description: "Thread-safety (nts or ts)"
1212
required: true
1313
outputs:
14+
vs:
15+
description: "The Visual Studio version"
16+
value: ${{ steps.prepare-build-env.outputs.vs }}
1417
build-dir:
1518
description: "The build directory to be used"
1619
value: ${{ steps.prepare-build-env.outputs.build-dir }}

.github/actions/windows/prepare-build/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ inputs:
1111
description: "Thread-safety (nts or ts)"
1212
required: true
1313
outputs:
14+
vs:
15+
description: "The Visual Studio version"
16+
value: ${{steps.setup-php.outputs.vs}}
1417
build-dir:
1518
description: "The build directory to be used"
1619
value: ${{steps.get-build-dir.outputs.build_dir}}

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

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
defaults:
3939
run:
4040
shell: cmd
41+
outputs:
42+
vs: ${{ steps.build-driver.outputs.vs }}
4143

4244
steps:
4345
- uses: actions/checkout@v4
@@ -114,27 +116,9 @@ jobs:
114116
- name: "Copy signature file"
115117
run: cp ${RELEASE_ASSETS}/php_mongodb.dll.sig .
116118

117-
- name: "Set compiler environment variable"
118-
run: |
119-
case "$PHP_VERSION" in
120-
"7.4")
121-
COMPILER="vc15"
122-
;;
123-
"8.0" | "8.1" | "8.2" | "8.3")
124-
COMPILER="vs16"
125-
;;
126-
"8.4")
127-
COMPILER="vs17"
128-
;;
129-
esac
130-
echo "COMPILER=${COMPILER}" >> "$GITHUB_ENV"
131-
shell: bash
132-
env:
133-
PHP_VERSION: ${{ inputs.php }}
134-
135119
- name: "Create and upload release asset"
136120
if: ${{ inputs.upload_release_asset }}
137121
run: |
138-
ARCHIVE=php_mongodb-${{ inputs.version }}-${{ inputs.php }}-${{ inputs.ts }}-${{ env.COMPILER }}-${{ inputs.arch }}.zip
122+
ARCHIVE=php_mongodb-${{ inputs.version }}-${{ inputs.php }}-${{ inputs.ts }}-${{ needs.build.outputs.vs }}-${{ inputs.arch }}.zip
139123
zip ${ARCHIVE} php_mongodb.dll php_mongodb.dll.sig php_mongodb.pdb CREDITS CONTRIBUTING.md LICENSE README.md THIRD_PARTY_NOTICES
140124
gh release upload ${{ inputs.version }} ${ARCHIVE}

0 commit comments

Comments
 (0)