Add pip gh action flow for test and prod #1
Workflow file for this run
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
# .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/* |