Skip to content

Commit

Permalink
only run python release for python- version tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Esgrove committed Oct 30, 2024
1 parent f3795d9 commit 86bde53
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/maturin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ on:
branches:
- main
- master
paths:
- ".github/workflows/maturin.yml"
- "python-pyo3/src/lib.rs"
- "python-pyo3/Cargo.lock"
- "python-pyo3/Cargo.toml"
tags:
- "*"
- "python-*"
pull_request:
paths:
- ".github/workflows/maturin.yml"
Expand Down Expand Up @@ -157,7 +162,7 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
if: ${{ startsWith(github.ref, 'refs/tags/python') || github.event_name == 'workflow_dispatch' }}
needs: [linux, musllinux, windows, macos, sdist]
permissions:
# Used to sign the release artifacts
Expand All @@ -174,7 +179,7 @@ jobs:
subject-path: "wheels-*/*"

- name: Publish to PyPI
if: "startsWith(github.ref, 'refs/tags/')"
if: "startsWith(github.ref, 'refs/tags/python')"
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
Expand Down

0 comments on commit 86bde53

Please sign in to comment.