Skip to content

Commit

Permalink
CI: continue publishing wheels when non-release
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 committed Aug 4, 2024
1 parent 6133254 commit 3f5b6f9
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -163,36 +164,42 @@ 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
with:
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__
Expand Down

0 comments on commit 3f5b6f9

Please sign in to comment.