Skip to content

Commit 8592388

Browse files
DEV: workflow to PyPI
1 parent 47078b8 commit 8592388

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
3+
4+
name: Publish New Version to PyPI
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: "3.9"
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install build
27+
- name: Build package
28+
run: python -m build
29+
- name: Publish package
30+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
31+
with:
32+
user: __token__
33+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)