Skip to content

Commit bbe511c

Browse files
authored
Merge pull request #5 from maastrichtlawtech/fix/query-payload-keyerror
Fix/query payload keyerror
2 parents eb5bac9 + 23ebc24 commit bbe511c

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
lint:
12-
if: github.event_name == 'pull_request'
12+
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Check out the repository
@@ -31,7 +31,7 @@ jobs:
3131

3232
test:
3333
needs: lint
34-
if: github.event_name == 'pull_request'
34+
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
3535
name: Test on ${{ matrix.os }}
3636
runs-on: ${{ matrix.os }}
3737
strategy:
@@ -65,7 +65,7 @@ jobs:
6565
pytest tests/ --doctest-modules --junitxml=junit/test-results.xml --cov=src/echr_extractor --cov-report=xml --cov-report=html
6666
6767
build:
68-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
68+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
6969
name: Build Python package
7070
runs-on: ubuntu-latest
7171
steps:
@@ -78,13 +78,18 @@ jobs:
7878
- name: Install build dependencies
7979
run: |
8080
python -m pip install --upgrade pip
81-
pip install setuptools wheel build
81+
pip install setuptools wheel build setuptools_scm
82+
83+
- name: Show version that will be built
84+
run: |
85+
python -c "import setuptools_scm; print('Version:', setuptools_scm.get_version())"
8286
8387
- name: Build package
8488
run: |
8589
python -m build
8690
8791
- name: Upload build artifacts
92+
if: startsWith(github.ref, 'refs/tags/')
8893
uses: actions/upload-artifact@v4
8994
with:
9095
name: python-package-distributions

RELEASE.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,17 @@ The CI/CD pipeline automatically:
6565

6666
### Workflow Triggers
6767

68-
- **Pull Requests**: Run tests and linting
69-
- **Main Branch Push**: Build and test (no release)
68+
- **Pull Requests**: Run tests, linting, and build verification
69+
- **Main Branch Push**: Run tests, linting, and build verification (no PyPI release)
7070
- **Tag Push**: Full release pipeline (build, test, upload to PyPI, create release)
7171

72+
### CI/CD Behavior
73+
74+
- **Development**: All jobs run on PRs and main branch pushes for testing
75+
- **Release**: Only tagged commits trigger PyPI publishing and GitHub releases
76+
- **Artifacts**: Build artifacts are only uploaded for tagged releases
77+
- **Version Display**: Shows the version that would be built for debugging
78+
7279
## 📦 Package Version Access
7380

7481
### In Python Code

0 commit comments

Comments
 (0)