Skip to content

Commit 07eba97

Browse files
Create publish-to-test-pypi.yml
1 parent 20cd52b commit 07eba97

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This is a basic workflow that is manually triggered
2+
3+
name: Publish injective-py to TestPyPI and PyPI
4+
on: push
5+
6+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
7+
jobs:
8+
build-n-publish:
9+
name: Build and publish injective-py to TestPyPI and PyPI
10+
# The type of runner that the job will run on
11+
runs-on: ubuntu-20.04
12+
13+
steps:
14+
- uses: actions/checkout@master
15+
- name: Set up Python 3.7
16+
uses: actions/setup-python@v1
17+
with:
18+
python-version: 3.7
19+
- name: Install pypa/build
20+
run: >-
21+
python -m
22+
pip install
23+
build
24+
--user
25+
- name: Build a binary wheel and a source tarball
26+
run: >-
27+
python -m
28+
build
29+
--sdist
30+
--wheel
31+
--outdir dist/
32+
- name: Publish distribution injective-py to Test PyPI
33+
uses: pypa/gh-action-pypi-publish@master
34+
with:
35+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
36+
repository_url: https://test.pypi.org/legacy/
37+
- name: Publish distribution 📦 to PyPI
38+
if: startsWith(github.ref, 'refs/tags')
39+
uses: pypa/gh-action-pypi-publish@master
40+
with:
41+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)