Skip to content

Commit 7e6f481

Browse files
authored
Merge pull request #75 from NeurodataWithoutBorders/auto_publish_action
[Dev Feature]: auto-publish to PyPI
2 parents 609226a + c8415cb commit 7e6f481

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/auto-publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Package to PyPI
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: "3.7"
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install wheel
23+
- name: Build package
24+
run: python setup.py sdist bdist_wheel
25+
- name: pypi-publish
26+
uses: pypa/[email protected]
27+
with:
28+
verbose: true
29+
user: __token__
30+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)