|
1 | | -name: core |
| 1 | +name: package |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | branches: main |
6 | 6 | paths: |
| 7 | + - '.github/workflows/package.yml' |
7 | 8 | - 'relay/**' |
8 | | - - 'cli/**' |
| 9 | + - 'tests/**' |
9 | 10 | - 'pyproject.toml' |
10 | 11 | - 'Makefile' |
11 | | - - '.github/workflows/core.yml' |
12 | 12 | pull_request: |
13 | 13 | branches: main |
14 | 14 | paths: |
| 15 | + - '.github/workflows/package.yml' |
15 | 16 | - 'relay/**' |
16 | | - - 'cli/**' |
| 17 | + - 'tests/**' |
17 | 18 | - 'pyproject.toml' |
18 | 19 | - 'Makefile' |
19 | | - - '.github/workflows/core.yml' |
20 | 20 | release: |
21 | 21 | types: [published] |
22 | 22 |
|
|
28 | 28 | jobs: |
29 | 29 | install: |
30 | 30 | if: github.event_name == 'pull_request' |
31 | | - runs-on: ubuntu-latest |
| 31 | + runs-on: ${{ matrix.os }} |
| 32 | + strategy: |
| 33 | + matrix: |
| 34 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 35 | + python: ['3.11', '3.12', '3.13'] |
32 | 36 | steps: |
33 | 37 | - uses: actions/checkout@v4 |
34 | 38 | - uses: actions/setup-python@v5 |
35 | 39 | with: |
36 | | - python-version: ${{ env.PYTHON_VERSION }} |
| 40 | + python-version: ${{ matrix.python }} |
37 | 41 | architecture: x64 |
38 | 42 | - uses: astral-sh/setup-uv@v6 |
39 | 43 | with: |
@@ -126,13 +130,18 @@ jobs: |
126 | 130 | fail_ci_if_error: true |
127 | 131 |
|
128 | 132 | build: |
129 | | - if: github.event_name != 'release' |
130 | | - runs-on: ubuntu-latest |
| 133 | + if: github.event_name == 'pull_request' |
| 134 | + needs: install |
| 135 | + runs-on: ${{ matrix.os }} |
| 136 | + strategy: |
| 137 | + matrix: |
| 138 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 139 | + python: ['3.11', '3.12', '3.13'] |
131 | 140 | steps: |
132 | 141 | - uses: actions/checkout@v4 |
133 | 142 | - uses: actions/setup-python@v5 |
134 | 143 | with: |
135 | | - python-version: ${{ env.PYTHON_VERSION }} |
| 144 | + python-version: ${{ matrix.python }} |
136 | 145 | architecture: x64 |
137 | 146 | - uses: astral-sh/setup-uv@v6 |
138 | 147 | with: |
@@ -170,20 +179,21 @@ jobs: |
170 | 179 | echo "package_version=${BUILD_VERSION}" >> $GITHUB_OUTPUT |
171 | 180 | echo "BUILD_VERSION=${BUILD_VERSION}" >> $GITHUB_ENV |
172 | 181 | - name: Publish to PyPI |
173 | | - env: |
174 | | - UV_PUBLISH_USERNAME: __token__ |
175 | | - UV_PUBLISH_PASSWORD: ${{ secrets.PYPI_TOKEN }} |
176 | 182 | run: | |
177 | 183 | make set-version |
178 | 184 | make build && make publish |
179 | 185 |
|
180 | 186 | verify-publish: |
181 | | - runs-on: ubuntu-latest |
| 187 | + runs-on: ${{ matrix.os }} |
| 188 | + strategy: |
| 189 | + matrix: |
| 190 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 191 | + python: ['3.11', '3.12', '3.13'] |
182 | 192 | needs: publish |
183 | 193 | steps: |
184 | 194 | - uses: actions/setup-python@v5 |
185 | 195 | with: |
186 | | - python-version: ${{ env.PYTHON_VERSION }} |
| 196 | + python-version: ${{ matrix.python }} |
187 | 197 | architecture: x64 |
188 | 198 | - uses: astral-sh/setup-uv@v6 |
189 | 199 | with: |
|
0 commit comments