Skip to content

Commit

Permalink
added publishing script to pypi - Adithya S K
Browse files Browse the repository at this point in the history
  • Loading branch information
adithya-s-k committed Jun 1, 2024
1 parent 1c7ad4e commit f9fe52f
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yaml
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/*

0 comments on commit f9fe52f

Please sign in to comment.