Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
so-saf committed Sep 7, 2024
1 parent 7ff26e8 commit 990385b
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name-template: "$RESOLVED_VERSION"
tag-template: "$RESOLVED_VERSION"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
sort-direction: ascending

categories:
- title: "Breaking changes"
labels:
- "breaking-change"
- title: "New features"
labels:
- "new-feature"
- title: "Bug fixes"
labels:
- "bugfix"
- title: "Enhancements"
labels:
- "enhancement"
- "refactor"
- "performance"
- title: "Maintenance"
labels:
- "maintenance"
- "ci"
- title: "Documentation"
labels:
- "documentation"
- title: "Dependency updates"
labels:
- "dependencies"

version-resolver:
major:
labels:
- "major"
- "breaking-change"
minor:
labels:
- "minor"
- "new-feature"
patch:
labels:
- "bugfix"
- "chore"
- "ci"
- "dependencies"
- "documentation"
- "enhancement"
- "performance"
- "refactor"
default: patch

template: |
## What’s changed
$CHANGES
19 changes: 19 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Release Drafter

# yamllint disable-line rule:truthy
on:
push:
branches:
- master
workflow_dispatch:

jobs:
update_release_draft:
name: Draft release
runs-on: ubuntu-latest
steps:
- name: Run Release Drafter
uses: release-drafter/release-drafter@v6.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Release

# yamllint disable-line rule:truthy
on:
release:
types:
- published

env:
DEFAULT_PYTHON: "3.12"

jobs:
release:
name: Releasing to PyPi
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/pydantic-filters
permissions:
id-token: write
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.6
- name: Set up Poetry
run: pipx install poetry
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: "poetry"
- name: Install workflow dependencies
run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Install dependencies
run: poetry install --no-interaction
- name: Set package version
run: |
version="${{ github.event.release.tag_name }}"
version="${version,,}"
version="${version#v}"
poetry version --no-interaction "${version}"
- name: Build package
run: poetry build --no-interaction
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
verbose: true
print-hash: true
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

**Source Code:** https://github.com/so-saf/pydantic-filters

[![Testing](https://github.com/so-saf/pydantic-filters/actions/workflows/test.yaml/badge.svg)](https://github.com/so-saf/pydantic-filters/actions/workflows/test.yaml)
[![license](https://img.shields.io/github/license/so-saf/pydantic-filters.svg)](https://github.com/so-saf/pydantic-filters/blob/main/LICENSE)
[![Linting](https://github.com/so-saf/pydantic-filters/actions/workflows/linting.yaml/badge.svg)](https://github.com/so-saf/pydantic-filters/actions/workflows/linting.yaml)

---

Describe the filters, not implement them!
Expand Down

0 comments on commit 990385b

Please sign in to comment.