GHA: Change condition to allow manually building wheels in forks

This commit is contained in:
Hugo van Kemenade 2021-12-01 12:42:11 +02:00
parent 22ad04743c
commit 915d014136

View File

@ -132,7 +132,7 @@ jobs:
- name: Build Pillow - name: Build Pillow
run: | run: |
$FLAGS="" $FLAGS=""
if ('${{ github.event_name }}' -eq 'push') { $FLAGS="--disable-imagequant" } if ('${{ github.event_name }}' -ne 'pull_request') { $FLAGS="--disable-imagequant" }
& winbuild\build\build_pillow.cmd $FLAGS install & winbuild\build\build_pillow.cmd $FLAGS install
& $env:pythonLocation\python.exe selftest.py --installed & $env:pythonLocation\python.exe selftest.py --installed
shell: pwsh shell: pwsh
@ -175,14 +175,14 @@ jobs:
- name: Build wheel - name: Build wheel
id: wheel id: wheel
if: "github.event_name == 'push'" if: "github.event_name != 'pull_request'"
run: | run: |
for /f "tokens=3 delims=/" %%a in ("${{ github.ref }}") do echo ::set-output name=dist::dist-%%a for /f "tokens=3 delims=/" %%a in ("${{ github.ref }}") do echo ::set-output name=dist::dist-%%a
winbuild\\build\\build_pillow.cmd --disable-imagequant bdist_wheel winbuild\\build\\build_pillow.cmd --disable-imagequant bdist_wheel
shell: cmd shell: cmd
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
if: "github.event_name == 'push'" if: "github.event_name != 'pull_request'"
with: with:
name: ${{ steps.wheel.outputs.dist }} name: ${{ steps.wheel.outputs.dist }}
path: dist\*.whl path: dist\*.whl