Skip to content

Commit 339ef0c

Browse files
ci: gate PyPI publish workflows on CI passing (#18)
* Initial plan * Make publish to PyPI steps dependent on CI (test and linting) job passing - Add workflow_call trigger to ci.yml for reusable workflow support - Gate build job in publish-to-pypi.yml on CI passing - Gate publish job in release.yml on CI passing Co-authored-by: deviantintegral <255023+deviantintegral@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: deviantintegral <255023+deviantintegral@users.noreply.github.com>
1 parent e20ff49 commit 339ef0c

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches: [main]
55
pull_request:
6+
workflow_call:
67

78
jobs:
89
lint-and-test:

.github/workflows/publish-to-pypi.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ on:
77
types: [published]
88

99
jobs:
10+
ci:
11+
uses: ./.github/workflows/ci.yml
12+
permissions:
13+
contents: read
14+
1015
build:
16+
needs: ci
1117
runs-on: ubuntu-latest
1218
permissions:
1319
contents: read

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ permissions:
99
id-token: write
1010

1111
jobs:
12+
ci:
13+
uses: ./.github/workflows/ci.yml
14+
1215
release-please:
1316
runs-on: ubuntu-latest
1417
outputs:
@@ -20,7 +23,7 @@ jobs:
2023
release-type: python
2124

2225
publish:
23-
needs: release-please
26+
needs: [ci, release-please]
2427
if: ${{ needs.release-please.outputs.release_created }}
2528
runs-on: ubuntu-latest
2629
environment: pypi

0 commit comments

Comments
 (0)