Skip to content

Commit cf962e9

Browse files
committed
Add GitHub Actions to Publish to PyPI
1 parent 79ef302 commit cf962e9

2 files changed

Lines changed: 37 additions & 2 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
deploy:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v3
20+
with:
21+
python-version: '3.10'
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install build
27+
28+
- name: Build package
29+
run: python -m build
30+
31+
- name: Publish package
32+
uses: pypa/gh-action-pypi-publish@v1
33+
with:
34+
user: __token__
35+
password: ${{ secrets.PYPI_API_TOKEN }}

github_action_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def append_job_summary(markdown_text: str) -> None:
476476

477477
def overwrite_job_summary(markdown_text: str) -> None:
478478
"""
479-
overwrites Summery of the job for the GitHub Action Summary page.
479+
overwrites summary of the job for the GitHub Action Summary page.
480480
481481
:param markdown_text: string with Markdown text
482482
:returns: None
@@ -487,7 +487,7 @@ def overwrite_job_summary(markdown_text: str) -> None:
487487

488488
def remove_job_summary() -> None:
489489
"""
490-
removes Summery file for the job.
490+
removes summary file for the job.
491491
492492
:returns: None
493493
"""

0 commit comments

Comments
 (0)