From 3f5b6f9ea47462486cd67eb64ad2d2b82db05178 Mon Sep 17 00:00:00 2001 From: snowman2 Date: Fri, 2 Aug 2024 22:12:30 -0500 Subject: [PATCH] CI: continue publishing wheels when non-release --- .github/workflows/release.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 42e8934f0..003214b29 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,7 +4,7 @@ on: push: branches: [ main ] release: - types: [ created ] + types: [ released, prereleased ] pull_request: # also build on PRs touching this file paths: - ".github/workflows/release.yaml" @@ -57,6 +57,7 @@ jobs: build_wheels: name: Build ${{ matrix.arch }} wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} + continue-on-error: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }} strategy: fail-fast: false matrix: @@ -163,6 +164,7 @@ jobs: publish: name: Publish on PyPI needs: [make_sdist,build_wheels] + if: ${{ github.repository_owner == 'pyproj4' && github.event_name != 'pull_request' }} runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v4 @@ -170,29 +172,34 @@ jobs: name: sdist path: dist - uses: actions/download-artifact@v4 + continue-on-error: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }} with: name: wheels-ubuntu-22.04-x86_64 path: dist - uses: actions/download-artifact@v4 + continue-on-error: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }} with: - name: wheels-macos-11-x86_64 + name: wheels-macos-12-x86_64 path: dist - uses: actions/download-artifact@v4 + continue-on-error: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }} with: name: wheels-macos-14-arm64 path: dist - uses: actions/download-artifact@v4 + continue-on-error: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }} with: name: wheels-windows-2022-auto64 path: dist - uses: actions/download-artifact@v4 + continue-on-error: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }} with: name: wheels-windows-2022-auto32 path: dist - name: Upload Wheels to PyPI # release on every tag - if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/') + if: ${{ github.event_name == 'release' && startsWith(github.ref, 'refs/tags/') }} uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__