File tree Expand file tree Collapse file tree 3 files changed +47
-3
lines changed
Expand file tree Collapse file tree 3 files changed +47
-3
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ ruff format
154154
155155## Build
156156
157- Generate distribution packages:
157+ Generate the distribution packages:
158158
159159``` sh
160160python3 -m build
@@ -172,7 +172,13 @@ Install the package:
172172pip install --index-url https://test.pypi.org/simple/ --no-deps python_cli_template
173173```
174174
175- Generate [ docs] ( https://pdoc.dev/ ) :
175+ Bundle the package with [ PyInstaller] ( https://pyinstaller.org/ ) :
176+
177+ ``` sh
178+ pyinstaller src/python_cli_template/cli.py --name python_cli_template
179+ ```
180+
181+ Generate the docs with [ pdoc] ( https://pdoc.dev/ ) :
176182
177183``` sh
178184pdoc src/python_cli_template/
Original file line number Diff line number Diff line change 2121 release-type : python
2222
2323 publish :
24- runs-on : ubuntu-latest
2524 needs : release-please
2625 if : ${{ needs.release-please.outputs.release_created }}
26+ runs-on : ubuntu-latest
2727 permissions :
2828 contents : read
2929 id-token : write
4949
5050 - name : Publish package to PyPI
5151 uses : pypa/gh-action-pypi-publish@v1
52+
53+ upload :
54+ needs : release-please
55+ if : ${{ needs.release-please.outputs.release_created }}
56+ runs-on : ${{ matrix.os }}
57+ strategy :
58+ matrix :
59+ os : [ubuntu-latest, macos-latest, windows-latest]
60+ permissions :
61+ contents : write
62+
63+ steps :
64+ - name : Checkout repository
65+ uses : actions/checkout@v4
66+
67+ - name : Use Python
68+ uses : actions/setup-python@v5
69+ with :
70+ cache : pip
71+ python-version : 3
72+
73+ - name : Install dependencies
74+ run : pip install pyinstaller
75+
76+ - name : Build binary
77+ run : pyinstaller src/python_cli_template/cli.py --name python_cli_template
78+
79+ - name : Upload Release Artifact
80+ shell : bash
81+ run : |
82+ cd dist
83+ os=${{ matrix.os }}
84+ filename=${os%-*}.zip
85+ zip -r $filename python_cli_template
86+ gh release upload ${{ needs.release.outputs.tag_name }} $filename
87+ env :
88+ GH_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ python_cli_template = "python_cli_template.cli:main"
2525build = [
2626 " build==1.2.2.post1" ,
2727 " pdoc==15.0.1" ,
28+ " pyinstaller==6.12.0" ,
2829 " twine==6.1.0" ,
2930]
3031test = [
You can’t perform that action at this time.
0 commit comments