Skip to content

Commit b3f54f8

Browse files
authored
Create pypi.yml
Create the action for PYPI deployment
1 parent 028c1a8 commit b3f54f8

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/pypi.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: PYPI
4+
5+
on:
6+
# Only trigger this workflow manually from the Actions tab
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
env:
13+
python-version: 3.7
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python ${{ env.python-version }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ env.python-version }}
20+
- name: Install pypa/build
21+
run: |
22+
python -m pip install build --user
23+
- name: Check current directory
24+
run: |
25+
pwd
26+
ls
27+
- name: Build a binary wheel and a source tarball
28+
run: |
29+
python -m build --sdist --wheel --outdir dist/ .
30+
- name: Publish Python 🐍 distributions 📦 to Test PyPI
31+
uses: pypa/gh-action-pypi-publish@release/v1
32+
with:
33+
user: __token__
34+
repository_url: https://test.pypi.org/legacy/
35+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
36+
- name: Publish Python 🐍 distributions 📦 to PyPI
37+
uses: pypa/gh-action-pypi-publish@release/v1
38+
with:
39+
user: __token__
40+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)