@@ -58,12 +58,16 @@ inputs:
5858runs :
5959 using : composite
6060 steps :
61+ - name : Import module
62+ shell : pwsh
63+ run : |
64+ Add-Content -Path $env:GITHUB_ENV -Value "PSModulePath=${{ github.action_path }};$env:PSModulePath" -Encoding utf8
65+
6166 - name : Check checkout state
6267 id : checkout-state
6368 shell : pwsh
6469 run : |
65- Import-Module ${{ github.action_path }}\BuildPhpExtension -Force
66- Add-Content -Path $env:GITHUB_OUTPUT -Value "checkout_state=$(Get-CheckoutState -Repository $env:GITHUB_REPOSITORY)" -Encoding utf8
70+ Get-CheckoutState -Repository $env:GITHUB_REPOSITORY
6771
6872 - name : Checkout
6973 if : ${{ steps.checkout-state.outputs.checkout_state == 'false' }}
7377 id : vs-check
7478 shell : pwsh
7579 run : |
76- Import-Module ${{ github.action_path }}\BuildPhpExtension -Force
7780 Get-VsCacheInfo -PhpVersion ${{ inputs.php-version }}
7881
7982 - name : Restore VS components cache
8891 if : steps.vs-cache.outputs.cache-hit == 'true'
8992 shell : pwsh
9093 run : |
91- Import-Module ${{ github.action_path }}\BuildPhpExtension -Force
9294 Invoke-RestoreVsToolsetCache -CachePath "${{ steps.vs-check.outputs.vs-cache-path }}" -VsInstallPath "${{ steps.vs-check.outputs.vs-install-path }}"
9395
9496 - name : Build PHP Extension
@@ -108,7 +110,6 @@ runs:
108110 AUTO_DETECT_ARGS : ${{env.auto-detect-args}}
109111 AUTO_DETECT_LIBS : ${{env.auto-detect-libs}}
110112 run : |
111- Import-Module ${{ github.action_path }}\BuildPhpExtension -Force
112113 Invoke-PhpBuildExtension -ExtensionUrl "${{inputs.extension-url}}" `
113114 -ExtensionRef "${{inputs.extension-ref}}" `
114115 -PhpVersion ${{inputs.php-version}} `
@@ -119,7 +120,6 @@ runs:
119120 if : steps.vs-check.outputs.needs-vs-install == 'true' && steps.vs-cache.outputs.cache-hit != 'true'
120121 shell : pwsh
121122 run : |
122- Import-Module ${{ github.action_path }}\BuildPhpExtension -Force
123123 Invoke-SaveVsToolsetCache -PhpVersion ${{ inputs.php-version }} -CachePath "${{ steps.vs-check.outputs.vs-cache-path }}"
124124
125125 - name : Save VS components cache
0 commit comments