Skip to content

Commit 0fb247e

Browse files
Add 'publish.yml' GitHub workflow
1 parent 5888273 commit 0fb247e

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/publish.yml

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

0 commit comments

Comments
 (0)