Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: publish to pip workflow #6

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 21 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,33 @@ name: Deploy to PyPI

on:
release:
types:
- created
types: [created] # Trigger this action on release creation

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- 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: Extract version from tag
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Build and publish to PyPI
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine

- name: Build and publish to PyPI
run: |
python setup.py sdist bdist_wheel --version $VERSION
twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: pypi-${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

VERSION = '2.0.0-alpha1'
VERSION = '2.0.0-alpha37'
DESCRIPTION = 'Keploy'
LONG_DESCRIPTION = 'Keploy Python SDK'

Expand Down
Empty file.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import yaml

def write_dedup(result, id):
filePath = '/Users/pranshu/testing/python-fastapi/dedupData.yaml'
filePath = 'dedupData.yaml'
existingData = []
try:
with open(filePath, 'r') as file:
Expand Down