File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Upload Python Package
2+
3+ on :
4+ release :
5+ types : [created]
6+ workflow_run :
7+ workflows : ["Test"]
8+ types :
9+ - completed
10+
11+ jobs :
12+ pypi-publish :
13+ name : upload release to PyPI
14+
15+ runs-on : ubuntu-latest
16+ # Specifying a GitHub environment is optional, but strongly encouraged
17+ environment : release
18+ permissions :
19+ # IMPORTANT: this permission is mandatory for trusted publishing
20+ id-token : write
21+
22+ steps :
23+ # retrieve your distributions here
24+ - uses : actions/checkout@v3
25+
26+ - name : Set up Python 3.11
27+ uses : actions/setup-python@v4
28+ with :
29+ python-version : " 3.11"
30+
31+ - name : Install dependencies
32+ run : |
33+ python -m pip install --upgrade pip
34+ pip install hatch
35+
36+ - name : Build package distributions
37+ run : |
38+ hatch build
39+
40+ - name : Publish package distributions to PyPI
41+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change @@ -67,5 +67,13 @@ dev-dependencies = [
6767[tool .hatch .metadata ]
6868allow-direct-references = true
6969
70+ [tool .hatch .build .targets .sdist ]
71+ include = [
72+ " /src" ,
73+ ]
74+
75+ [tool .hatch .build .targets .wheel ]
76+ packages = [" src/python_usernames" ]
77+
7078[tool .hatch .version ]
7179path = " src/python_usernames/__about__.py"
You can’t perform that action at this time.
0 commit comments