Skip to content

Commit 24270fe

Browse files
committed
fix: run release job only for production tags (exclude *-test)
1 parent 129bc9f commit 24270fe

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.github/workflows/cicd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ jobs:
8686
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
8787
repository-url: https://test.pypi.org/legacy/
8888

89-
# Release: PyPI + GitHub Release (tag v* on main, or workflow_dispatch)
89+
# Release: PyPI + GitHub Release (tag v* but NOT *-test, or workflow_dispatch)
9090
release:
9191
needs: ci
9292
if: |
93-
startsWith(github.ref, 'refs/tags/v') ||
93+
(startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '-test')) ||
9494
(github.event_name == 'workflow_dispatch' && github.event.inputs.release_version != '')
9595
runs-on: ubuntu-latest
9696
permissions:

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@ repos:
66
name: ruff check
77
entry: uv run ruff check .
88
language: system
9+
files: \.py$
910
- id: ruff-format
1011
name: ruff format
1112
entry: uv run ruff format --check .
1213
language: system
14+
files: \.py$
1315
- id: mypy
1416
name: mypy
1517
entry: uv run mypy pearsonify
1618
language: system
19+
files: \.py$
1720
- id: pytest
1821
name: pytest
1922
entry: uv run pytest tests/ -q
2023
language: system
24+
files: \.py$

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ line-length = 88
7979
target-version = "py39"
8080
lint.select = ["E", "F", "W", "I", "N", "B", "C4", "UP"]
8181
lint.ignore = ["E203", "E501"]
82+
exclude = [".github"]
8283

8384
[tool.ruff.format]
8485
docstring-code-format = true

0 commit comments

Comments
 (0)