Skip to content

Commit

Permalink
Add pip gh action flow for test and prod
Browse files Browse the repository at this point in the history
  • Loading branch information
mdr0id committed Aug 12, 2024
1 parent 6026009 commit 2ddd354
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci-pip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# .github/workflows/ci-pip.yml
jobs:
pypi-publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/<your-pypi-project-name>
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install dependencies
run: pip install --upgrade setuptools wheel twine

- name: Build the package
run: |
cd jito_searcher_client
python setup.py sdist bdist_wheel
- name: Publish package to TestPyPI
run: twine upload --repository-url https://test.pypi.org/legacy/ dist/*

- name: Publish package to PyPI
run: twine upload dist/*

0 comments on commit 2ddd354

Please sign in to comment.