-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added publishing script to pypi - Adithya S K
- Loading branch information
1 parent
1c7ad4e
commit f9fe52f
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Publish Package | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
publish: | ||
name: Publish Package | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build Package | ||
run: | | ||
python -m build | ||
- name: Publish Package to PyPI | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{secrets.PYPI_API_TOKEN}} | ||
run: | | ||
python -m twine upload --repository pypi dist/* |