fix: switch releases to tag based workflow triggers

This commit is contained in:
Stefan
2026-06-25 19:52:29 +02:00
parent ec8428e0b4
commit 905184123f
10 changed files with 34 additions and 102 deletions
+4 -17
View File
@@ -3,26 +3,15 @@ env:
WORKING_DIRECTORY: bindings/python
on:
push:
branches:
- master
tags-ignore:
- '**'
paths:
- 'bindings/python/**'
- 'core/**'
- 'test-data/**'
- '.github/workflows/python.yaml'
pull_request:
paths:
- 'bindings/python/**'
- 'core/**'
- 'test-data/**'
- '.github/workflows/python.yaml'
# Stable publish is driven by the GitHub Release that release-please creates
# for the `python` component (tag `python-v<version>`).
release:
types: [ published ]
push:
tags:
- 'python-v*'
permissions:
contents: read
@@ -31,7 +20,6 @@ jobs:
# The build jobs skip on release events for other components (release-please fires
# one `release` event per component; only `python-v*` should build/publish here).
wheels:
if: "github.event_name != 'release' || startsWith(github.event.release.tag_name, 'python-v')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@@ -82,7 +70,6 @@ jobs:
path: dist
sdist:
if: "github.event_name != 'release' || startsWith(github.event.release.tag_name, 'python-v')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -106,7 +93,7 @@ jobs:
runs-on: ubuntu-latest
environment: release
# Publishes only on the release-please GitHub Release for the python component.
if: "github.event_name == 'release' && startsWith(github.event.release.tag_name, 'python-v')"
if: "github.ref_type == 'tag'"
needs: [ wheels, sdist ]
steps:
- uses: actions/download-artifact@v4