Skip to content

Commit c13a6e6

Browse files
authored
Merge pull request #2 from Sholofly/workflows
Add workflow for test pypi
2 parents 49048d1 + a4def42 commit c13a6e6

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
2+
on: push
3+
jobs:
4+
build-n-publish:
5+
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
6+
runs-on: ubuntu-18.04
7+
steps:
8+
- uses: actions/checkout@master
9+
- name: Set up Python 3.7
10+
uses: actions/setup-python@v1
11+
with:
12+
python-version: 3.7
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+
- name: Publish distribution 📦 to Test PyPI
27+
uses: pypa/gh-action-pypi-publish@master
28+
with:
29+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
30+
repository_url: https://test.pypi.org/legacy/
31+
skip_existing: true
32+
# - name: Publish distribution 📦 to PyPI
33+
# if: startsWith(github.ref, 'refs/tags')
34+
# uses: pypa/gh-action-pypi-publish@master
35+
# with:
36+
# password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)