Release v0.0.2 #352
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install uv | |
run: pip install uv | |
- name: Set up uv environment | |
run: uv venv | |
- name: Install dependencies | |
run: uv pip install -r pyproject.toml .[dev] | |
- name: Activate virtual environment & run linters | |
run: | | |
source .venv/bin/activate | |
isort . --check-only | |
black . --check | |
bandit: | |
name: bandit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install uv | |
run: pip install uv | |
- name: Set up uv environment | |
run: uv venv | |
- name: Install dependencies | |
run: uv pip install -r pyproject.toml .[dev] | |
- name: Activate virtual environment & run bandit | |
run: | | |
source .venv/bin/activate | |
bandit -r -c pyproject.toml . --skip B105,B106,B101 | |
cognitive: | |
name: cognitive | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install uv | |
run: pip install uv | |
- name: Set up uv environment | |
run: uv venv | |
- name: Install dependencies | |
run: uv pip install -r pyproject.toml .[dev] | |
- name: Activate virtual environment & run ruff | |
run: | | |
source .venv/bin/activate | |
ruff check . --select C901 | |
pydocstyle: | |
name: pydocstyle | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install uv | |
run: pip install uv | |
- name: Set up uv environment | |
run: uv venv | |
- name: Install dependencies | |
run: uv pip install -r pyproject.toml .[dev] | |
- name: Activate virtual environment & run pydocstyle | |
run: | | |
source .venv/bin/activate | |
pydocstyle . | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
needs: [bandit, cognitive, lint, pydocstyle] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install uv | |
run: pip install uv | |
- name: Set up uv environment | |
run: uv venv | |
- name: Install dependencies | |
run: uv pip install -r pyproject.toml .[dev] | |
- name: Activate virtual environment & run tests | |
run: | | |
source .venv/bin/activate | |
pytest | |
release: | |
name: tag, changelog, release, publish | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install uv | |
run: pip install uv | |
- name: Set up uv environment | |
run: uv venv | |
- name: Install dependencies | |
run: uv pip install -r pyproject.toml | |
- name: Version | |
uses: paulhatch/semantic-version@v5.0.0 | |
id: version | |
with: | |
major_pattern: "(feat!)" | |
minor_pattern: "(feat)" | |
- name: Create changelog text | |
id: changelog | |
uses: loopwerk/tag-changelog@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
exclude_types: other,doc,chore | |
- name: Create release | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.version.outputs.version_tag }} | |
release_name: Release ${{ steps.version.outputs.version_tag }} | |
body: ${{ steps.changelog.outputs.changes }} | |
- name: Create changelog pull request | |
uses: peter-evans/create-pull-request@v2 | |
with: | |
commit-message: "Release ${{ steps.version.outputs.version_tag }} [skip ci]" | |
labels: release, bot | |
title: "Release ${{ steps.version.outputs.version_tag }}" | |
body: | | |
# Release ${{ steps.version.outputs.version_tag }} | |
Merge this PR to update your version and changelog! | |
## Included Pull Requests | |
${{ steps.changelog.outputs.changes }} |