Skip to content

Commit c3c093d

Browse files
author
2captcha
committed
added github workflow
1 parent 6c56e83 commit c3c093d

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to PyPI
2+
on: push
3+
jobs:
4+
build-n-publish:
5+
name: Build and publish to PyPI
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@master
9+
- name: Set up Python 3.10
10+
uses: actions/setup-python@v3
11+
with:
12+
python-version: "3.10"
13+
- name: Install pypa/build
14+
run: >-
15+
python -m
16+
pip install
17+
build
18+
--user
19+
- name: Build a binary wheel and a source tarball
20+
run: >-
21+
python -m
22+
build
23+
--sdist
24+
--wheel
25+
--outdir dist/
26+
.
27+
- name: Publish to Test PyPI
28+
uses: pypa/gh-action-pypi-publish@release/v1
29+
with:
30+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
31+
repository_url: https://test.pypi.org/legacy/
32+
- name: Publish to PyPI
33+
if: startsWith(github.ref, 'refs/tags')
34+
uses: pypa/gh-action-pypi-publish@release/v1
35+
with:
36+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)