Skip to content

Commit 83252b5

Browse files
committed
fix
1 parent 919167e commit 83252b5

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,40 @@ on:
44
push:
55
tags: ['v*']
66

7-
# Configuration - Edit this section
8-
env:
9-
# Set to 'true' to run tests before building wheels, 'false' to skip tests
10-
RUN_TESTS: 'false'
7+
jobs:
8+
# Configuration - Edit this section to enable/disable tests
9+
config:
10+
name: Configuration
11+
runs-on: ubuntu-latest
12+
outputs:
13+
run-tests: ${{ steps.config.outputs.run-tests }}
14+
os-matrix: ${{ steps.config.outputs.os-matrix }}
15+
python-matrix: ${{ steps.config.outputs.python-matrix }}
16+
steps:
17+
- id: config
18+
run: |
19+
# Set to 'true' to run tests before building wheels, 'false' to skip tests
20+
echo "run-tests=false" >> $GITHUB_OUTPUT
1121
12-
# Test matrix configuration (only used if RUN_TESTS is 'true')
13-
TEST_OS_MATRIX: '["ubuntu-latest", "macos-latest", "windows-latest"]'
14-
TEST_PYTHON_MATRIX: '["3.9", "3.10", "3.11", "3.12"]'
22+
# Test matrix configuration (only used if run-tests is 'true')
23+
echo 'os-matrix=["ubuntu-latest", "macos-latest", "windows-latest"]' >> $GITHUB_OUTPUT
24+
echo 'python-matrix=["3.9", "3.10", "3.11", "3.12"]' >> $GITHUB_OUTPUT
1525
16-
jobs:
1726
test:
1827
name: Run Tests
19-
if: env.RUN_TESTS == 'true'
28+
needs: config
29+
if: needs.config.outputs.run-tests == 'true'
2030
uses: ./.github/workflows/_test.yml
2131
with:
22-
os-matrix: ${{ env.TEST_OS_MATRIX }}
23-
python-matrix: ${{ env.TEST_PYTHON_MATRIX }}
32+
os-matrix: ${{ needs.config.outputs.os-matrix }}
33+
python-matrix: ${{ needs.config.outputs.python-matrix }}
2434
primary-os: "ubuntu-latest"
2535
primary-python: "3.11"
2636
secrets: inherit
2737

2838
build-wheels:
2939
name: Build Wheels (${{ matrix.os }})
30-
needs: test
40+
needs: [config, test]
3141
if: always() && (needs.test.result == 'success' || needs.test.result == 'skipped')
3242
runs-on: ${{ matrix.os }}
3343
strategy:

0 commit comments

Comments
 (0)