Skip to content

Commit d412efc

Browse files
authored
Added github workflows (#1)
1 parent 4e52ca1 commit d412efc

File tree

6 files changed

+225
-80
lines changed

6 files changed

+225
-80
lines changed

.github/release.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- dont-mention
5+
categories:
6+
- title: ⚠️ Breaking Changes
7+
labels:
8+
- breaking-change
9+
- title: ⚙️ New Features
10+
labels:
11+
- enhancement
12+
- title: 🐛 Bugfixes
13+
labels:
14+
- bug
15+
- title: 💋 Cosmetic Changes
16+
labels:
17+
- cosmetic
18+
- title: Other Changes
19+
labels:
20+
- "*"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Pull Request
2+
on:
3+
pull_request: {}
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install poetry
17+
run: pipx install poetry
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
cache: poetry
24+
25+
- name: Install Project and Test Dependencies
26+
run: poetry install --only test,main
27+
28+
- name: Pytest
29+
run: poetry run pytest
30+
31+
- name: MyPy
32+
run: poetry run mypy

.github/workflows/release.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Release Request
2+
on:
3+
release:
4+
types: ["published"]
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Install poetry
13+
run: pipx install poetry
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
cache: poetry
20+
21+
- name: Set Project Version
22+
shell: bash
23+
run: |
24+
version_ref="${{github.ref}}"
25+
poetry version "${version_ref#refs/tags/}"
26+
27+
- name: Build
28+
run: poetry build
29+
30+
- name: Upload Artifact
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: dist
34+
path: dist/
35+
36+
37+
attach-to-release:
38+
needs: build
39+
runs-on: ubuntu-latest
40+
41+
permissions:
42+
contents: write
43+
44+
steps:
45+
- uses: actions/download-artifact@v4
46+
with:
47+
name: dist
48+
path: dist
49+
50+
- name: Publish to GitHub release page
51+
uses: svenstaro/upload-release-action@v2
52+
with:
53+
repo_token: ${{ secrets.GITHUB_TOKEN }}
54+
file: "dist/*"
55+
file_glob: true
56+
tag: ${{ github.ref }}
57+
58+
59+
upload-to-pypi:
60+
needs: build
61+
runs-on: ubuntu-latest
62+
63+
environment:
64+
name: pypi
65+
url: https://pypi.org/p/dataclass-click
66+
67+
permissions:
68+
id-token: write
69+
70+
steps:
71+
- uses: actions/download-artifact@v4
72+
with:
73+
name: dist
74+
path: dist
75+
76+
- name: Upload to Pypi
77+
uses: pypa/gh-action-pypi-publish@release/v1

mkdocs/docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ determine which plugin is to blame before posting issues here or [there](https:/
1111

1212
## Features
1313

14-
It's advantages over the [mkdocstrings-python recopy](https://mkdocstrings.github.io/recipes/#automatic-code-reference-pages) are:
14+
Its advantages over the [mkdocstrings-python recipe](https://mkdocstrings.github.io/recipes/#automatic-code-reference-pages) are:
1515

1616
- ✅ Easier to use (no writing code for yourself)
1717
- ✅ Well formatted nav out of the box. Package names with underscores are not title case 📦
1818
- ✅ Compatibility with both explicit nav defined in mkdocs.yaml and implicit nav with no definition in mkdocs.yaml
19-
- ✅ Supports __init__.py files as [section indexes](https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#section-index-pages) if supported by the theme.
19+
- ✅ Supports `__init__.py` files as [section indexes](https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#section-index-pages) if supported by the theme.
2020
- ✅ Edit URI compatible with both `edit_uri` and `edit_uri_template`
2121

2222
## Minimal Example

0 commit comments

Comments
 (0)