Skip to content

Commit 0b6a4e5

Browse files
authored
Added Publish to TestPyPI action -> Main (#135)
1 parent 31dfd7a commit 0b6a4e5

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "[DO NOT TRIGGER] Publish to PyPI"
2+
3+
on:
4+
# To run this workflow manually from the Actions tab
5+
workflow_dispatch:
6+
7+
jobs:
8+
build-n-publish:
9+
name: Build and publish Python 🐍 distribution 📦 to PyPI
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.x"
18+
- name: Build distribution 📦
19+
run: |
20+
make dist
21+
- name: Validate
22+
run: |
23+
pip install dist/*.whl
24+
python -c "import ads;"
25+
- name: Publish distribution 📦 to Test PyPI
26+
env:
27+
TWINE_USERNAME: __token__
28+
TWINE_PASSWORD: ${{ secrets.GH_ADS_TESTPYPI_TOKEN }}
29+
run: |
30+
twine upload -r testpypi dist/* -u $TWINE_USERNAME -p $TWINE_PASSWORD

0 commit comments

Comments
 (0)