|
1 | 1 | name: build
|
2 | 2 |
|
3 | 3 | on:
|
4 |
| - push: |
5 | 4 | pull_request:
|
6 | 5 | workflow_call:
|
7 | 6 |
|
8 | 7 | jobs:
|
9 | 8 | build:
|
10 | 9 | name: Build and Test Package
|
11 | 10 | strategy:
|
12 |
| - matrix: |
13 |
| - version: |
14 |
| - - '3.8' |
15 |
| - - '3.9' |
16 |
| - - '3.10' |
17 |
| - - '3.11' |
18 |
| - - '3.12' |
19 |
| - os: [ubuntu-latest, windows-latest] |
| 11 | + matrix: |
| 12 | + version: |
| 13 | + - '3.8' |
| 14 | + - '3.9' |
| 15 | + - '3.10' |
| 16 | + - '3.11' |
| 17 | + - '3.12' |
| 18 | + os: [ubuntu-latest, windows-latest] |
| 19 | + include: |
| 20 | + - version: '3.12' |
| 21 | + os: ubuntu-latest |
| 22 | + upload: true |
20 | 23 | runs-on: ${{ matrix.os }}
|
21 | 24 |
|
22 | 25 | steps:
|
|
41 | 44 |
|
42 | 45 | - name: Upload the Docs
|
43 | 46 | uses: actions/upload-pages-artifact@v3
|
44 |
| - if: matrix.os == 'ubuntu-latest' && matrix.version == '3.12' |
| 47 | + if: matrix.upload |
45 | 48 | with:
|
46 | 49 | path: html/
|
47 | 50 |
|
|
52 | 55 | run: python3 -m build
|
53 | 56 |
|
54 | 57 | - name: Store the distribution packages
|
55 |
| - if: matrix.os == 'ubuntu-latest' && matrix.version == '3.12' |
| 58 | + if: matrix.upload |
56 | 59 | uses: actions/upload-artifact@v4
|
57 | 60 | with:
|
58 | 61 | name: python-package-distributions
|
59 | 62 | path: dist/
|
60 |
| - |
61 |
| - deploy-testpypi: |
62 |
| - name: Deploy Distribution to Test PyPI |
63 |
| - if: false # Currently disabled |
64 |
| - needs: [build] |
65 |
| - runs-on: ubuntu-latest |
66 |
| - environment: |
67 |
| - name: testpypi |
68 |
| - url: https://test.pypi.org/p/sphinx-multiversion |
69 |
| - permissions: |
70 |
| - id-token: write |
71 |
| - |
72 |
| - steps: |
73 |
| - - name: Download the Distributions |
74 |
| - uses: actions/download-artifact@v4 |
75 |
| - with: |
76 |
| - name: python-package-distributions |
77 |
| - path: dist/ |
78 |
| - |
79 |
| - - name: Publish Distributions to Test PyPI |
80 |
| - uses: pypa/gh-action-pypi-publish@release/v1 |
81 |
| - |
82 |
| - deploy-pypi: |
83 |
| - name: Deploy Distribution to PyPI |
84 |
| - if: startsWith(github.ref, 'refs/tags/') |
85 |
| - needs: [build] |
86 |
| - runs-on: ubuntu-latest |
87 |
| - environment: |
88 |
| - name: pypi |
89 |
| - url: https://pypi.org/p/sphinx-multiversion |
90 |
| - permissions: |
91 |
| - id-token: write |
92 |
| - |
93 |
| - steps: |
94 |
| - - name: Download the Distributions |
95 |
| - uses: actions/download-artifact@v4 |
96 |
| - with: |
97 |
| - name: python-package-distributions |
98 |
| - path: dist/ |
99 |
| - |
100 |
| - - name: Publish Distributions to PyPI |
101 |
| - uses: pypa/gh-action-pypi-publish@release/v1 |
0 commit comments