Skip to content

Commit e36c86b

Browse files
committed
Move the build job out of the publish job into the ci-release job.
This way the build job is run before the publish job.
1 parent 9b1a6b3 commit e36c86b

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

.github/workflows/ci-release.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@ jobs:
1313
os: '["ubuntu-latest", "windows-latest", "macos-latest"]'
1414
python-version: '["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]'
1515

16+
build:
17+
name: Build
18+
uses: glenn20/python-ci/.github/workflows/build.yaml@main
19+
1620
publish-test:
1721
name: Publish to test.pypi
22+
needs: build
1823
uses: ./.github/workflows/publish.yaml
1924
with:
2025
pypi: test.pypi
@@ -23,6 +28,7 @@ jobs:
2328

2429
publish-pypi:
2530
name: Publish to pypi
31+
needs: build
2632
uses: ./.github/workflows/publish.yaml
2733
with:
2834
pypi: pypi

.github/workflows/ci-tests.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ jobs:
2020
os: '["ubuntu-latest"]'
2121
python-version: '["3.9", "3.13"]'
2222

23+
build:
24+
name: Build
25+
uses: glenn20/python-ci/.github/workflows/build.yaml@main
26+
2327
publish-test:
2428
name: Publish to test.pypi
25-
needs: tests
29+
needs: build
2630
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
2731
uses: ./.github/workflows/publish.yaml
2832
with:

.github/workflows/publish.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,8 @@ on:
3434
type: string
3535

3636
jobs:
37-
build:
38-
name: Build
39-
uses: glenn20/python-ci/.github/workflows/build.yaml@main
40-
permissions:
41-
id-token: none
42-
4337
publish:
4438
name: Publish to ${{ inputs.pypi }}
45-
needs: build
4639
runs-on: ubuntu-latest
4740
environment:
4841
name: publish-${{ inputs.pypi }}

0 commit comments

Comments
 (0)