mirror of
https://github.com/gorules/zen.git
synced 2026-10-04 16:02:18 +00:00
fix: switch releases to tag based workflow triggers
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user