Skip to content

Commit c633c01

Browse files
authored
chore: consolidate release workflow into single job
Merge test and publish into one job to avoid duplicate Python setup. Remove environment setting (not configured on PyPI).
1 parent cb85b3b commit c633c01

1 file changed

Lines changed: 8 additions & 14 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99
contents: read
1010

1111
jobs:
12-
test:
12+
release:
1313
runs-on: ubuntu-latest
1414
timeout-minutes: 10
1515
steps:
@@ -18,26 +18,18 @@ jobs:
1818
uses: actions/setup-python@v5
1919
with:
2020
python-version: "3.13"
21+
22+
# 1. Test
2123
- name: Install dependencies
2224
run: |
2325
python -m pip install --upgrade pip
2426
pip install -e ".[dev]"
2527
- name: Run unit tests
2628
run: pytest tests/test_readers_opendataloader_pdf.py -v --disable-socket --allow-unix-socket
2729

28-
publish:
29-
needs: test
30-
runs-on: ubuntu-latest
31-
timeout-minutes: 10
32-
environment: release
33-
steps:
34-
- uses: actions/checkout@v4
35-
- name: Set up Python
36-
uses: actions/setup-python@v5
37-
with:
38-
python-version: "3.13"
30+
# 2. Build
3931
- name: Install build tools
40-
run: pip install --upgrade pip uv
32+
run: pip install uv
4133
- name: Update version from tag
4234
run: |
4335
VERSION="${GITHUB_REF_NAME#v}"
@@ -46,5 +38,7 @@ jobs:
4638
echo "Publishing version: $VERSION"
4739
- name: Build
4840
run: uv build
41+
42+
# 3. Publish (only on tag push)
4943
- name: Publish to PyPI
50-
uses: pypa/gh-action-pypi-publish@release/v1
44+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)