Skip to content

Commit 1773e8e

Browse files
authored
Merge pull request #17 from haroon10725/test-pypi
feat: add workflow to upload package to TestPyPI when pushing to main
2 parents d232baa + ccb3ab4 commit 1773e8e

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to Test PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
name: Build and Publish to Test PyPI
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.11"
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install build twine
25+
26+
- name: Build package
27+
run: python -m build
28+
29+
- name: Publish to Test PyPI
30+
env:
31+
TWINE_USERNAME: __token__
32+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
33+
run: twine upload --repository testpypi dist/*

0 commit comments

Comments
 (0)