|
10 | 10 |
|
11 | 11 | jobs: |
12 | 12 | full-ci: |
13 | | - uses: ./.github/workflows/ci-base.yml |
| 13 | + uses: ./.github/workflows/ci-monorepo.yml |
14 | 14 | with: |
| 15 | + package: async-cassandra |
15 | 16 | run-integration-tests: true |
16 | 17 | run-full-suite: true |
17 | 18 |
|
| 19 | + build-package: |
| 20 | + needs: full-ci |
| 21 | + runs-on: ubuntu-latest |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v4 |
| 24 | + |
| 25 | + - name: Set up Python |
| 26 | + uses: actions/setup-python@v5 |
| 27 | + with: |
| 28 | + python-version: '3.12' |
| 29 | + |
| 30 | + - name: Install build dependencies |
| 31 | + run: | |
| 32 | + python -m pip install --upgrade pip |
| 33 | + pip install build twine |
| 34 | +
|
| 35 | + - name: Build package |
| 36 | + run: | |
| 37 | + cd libs/async-cassandra |
| 38 | + python -m build |
| 39 | +
|
| 40 | + - name: Check package |
| 41 | + run: | |
| 42 | + cd libs/async-cassandra |
| 43 | + twine check dist/* |
| 44 | +
|
| 45 | + - name: Upload build artifacts |
| 46 | + uses: actions/upload-artifact@v4 |
| 47 | + with: |
| 48 | + name: python-package-distributions |
| 49 | + path: libs/async-cassandra/dist/ |
| 50 | + retention-days: 7 |
| 51 | + |
18 | 52 | publish-testpypi: |
19 | 53 | name: Publish to TestPyPI |
20 | | - needs: full-ci |
| 54 | + needs: [full-ci, build-package] |
21 | 55 | runs-on: ubuntu-latest |
22 | 56 | # Only publish for proper pre-release versions (PEP 440) |
23 | 57 | if: contains(github.ref_name, 'rc') || contains(github.ref_name, 'a') || contains(github.ref_name, 'b') |
@@ -266,11 +300,11 @@ jobs: |
266 | 300 |
|
267 | 301 | publish-pypi: |
268 | 302 | name: Publish to PyPI |
269 | | - needs: full-ci |
| 303 | + needs: [full-ci, build-package] |
270 | 304 | runs-on: ubuntu-latest |
271 | 305 | # Only publish stable versions (no pre-release suffix) |
272 | 306 | # Match only versions like v0.0.1, v1.2.3, etc (no suffix) |
273 | | - if: "!contains(github.ref_name, '-')" |
| 307 | + if: "!contains(github.ref_name, 'rc') && !contains(github.ref_name, 'a') && !contains(github.ref_name, 'b') && !contains(github.ref_name, 'dev')" |
274 | 308 |
|
275 | 309 | permissions: |
276 | 310 | id-token: write # Required for trusted publishing |
|
0 commit comments