Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/.keep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# keep
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule: { interval: "weekly" }
labels: ["deps","github-actions"]
- package-ecosystem: "pip"
directory: "/"
schedule: { interval: "weekly" }
labels: ["deps","python"]
open-pull-requests-limit: 10
23 changes: 23 additions & 0 deletions .github/workflows/auto-merge-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: auto-merge-dependabot
on:
pull_request:
types: [opened, synchronize, ready_for_review, labeled]
permissions:
contents: write
pull-requests: write
jobs:
automerge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Fetch metadata
id: meta
uses: dependabot/fetch-metadata@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge (squash) for non-major
if: steps.meta.outputs.update-type != 'version-update:semver-major'
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ github.event.pull_request.number }}
merge-method: squash
21 changes: 21 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: nightly
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
permissions: { contents: read }
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: '3.12' }
- run: python -m pip install -U pip
- run: pip install poetry
- run: poetry install --no-interaction
- run: poetry run ruff check .
- run: poetry run black --check .
- env: { PYTHONPATH: src }
run: poetry run pytest -q
- run: poetry run mypy src
15 changes: 6 additions & 9 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
name: publish-pypi
on:
workflow_dispatch: {} # Solo manual (seguro)

release:
types: [published]
permissions:
contents: read
id-token: write # OIDC (sin token)

id-token: write
jobs:
pypi:
environment: pypi # coincide con PyPI (opcional, recomendado)
publish:
environment: pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: '3.12' }
- run: python -m pip install -U pip build
- run: python -m build # genera dist/*
- run: python -m build
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/ # OIDC -> no password
22 changes: 22 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: semantic-release
on:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- uses: actions/setup-python@v5
with: { python-version: '3.12' }
- run: python -m pip install -U pip
- run: python -m pip install python-semantic-release==9.* build
- name: Run semantic-release (no PyPI upload)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: semantic-release version && semantic-release publish
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,15 @@ diff-risk-web = "diff_risk_dashboard.web:main"
[build-system]
requires = ["poetry-core>=1.8.0"]
build-backend = "poetry.core.masonry.api"

[tool.semantic_release]
branch = "main"
upload_to_repository = false
changelog_file = "CHANGELOG.md"
commit_parser = "angular"
version_toml = [
"pyproject.toml:version",
"pyproject.toml:project.version",
"pyproject.toml:tool.poetry.version"
]
build_command = "python -m pip install -U build && python -m build"
Loading